Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 3

2 bytes added, 12:46, 2 June 2017
PART 1 - Providing Functions With Arguments
sum_numbers(5, 10)
sum_numbers(50, 100)
</source>'''NOTE:''' Running functions with multiple arguments is the same. When you put a function as a argument of another function, the '''inner-most function will run first''', and the return the value '''10''' from the will be used as the argument for the '''outer function'''. In the example below, '''sum_numbers(5, 5)''' will return '''10''', thus providing that result to be square with that value '''square(10)'''.<br><br>
:#Issue the following to issue a function within another function:<source>
square(sum_numbers(5, 5))
13,420
edits