Changes

Jump to: navigation, search

OPS435 Python3 Lab 3

4 bytes added, 12:18, 25 September 2019
m
PART 1 - Providing Functions With Arguments
def square(number):
return number ** 2
</source>'''FYI:'''You may have learned that you multiple multipley a number by itself in order to "square" the number. In python, the '''**''' operator will raise the operand on the left to the power of the operand on the right, which will give the same result as muliple muliplying the number by itself.<br><br>When calling functions with multiple arguments, the arguments are separated by '''commas'''. See what happens if you provide strings, strings without using quotes, or numbers with decimals in the following examples.
:#Test your '''square()''' function:<source lang="python">
def square(number):
14
edits

Navigation menu