Python Python Basics Functions and Looping Create a Function

Jaqua Starr
PRO
Jaqua Starr
Pro Student 516 Points

Calling a function challenge

I am trying to call my new function and pass it the argument 3, but I am not sure what it is asking. Please help!

squaring.py
def square(number):
    return (number * number)
result = square
print(result) #prints the square value

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,749 Points

To call a function and pass an argument include the name of the function, followed by the argument within parentheses.

So in this case to call square and pass in a value of 3:

result = square(3)