Changes

Jump to: navigation, search

OPS435 Python3 Lab 3

10 bytes added, 17:31, 19 September 2019
PART 1 - Providing Functions With Arguments
print(square(square(2)))
print(square('2'))
</source>
:#The last function call should produce an '''error message'''. This is caused by sending a '''string''' instead of a number that is processed by the function. We could use the int() function to convert any value passed in as a string by mistake to an integer number.<br><br>
:#Declare the function '''sum_numbers()''':<source lang="python">
1,760
edits

Navigation menu