Python Python Basics Functions and Looping Create a Function

Carlos Augusto Villegas
Carlos Augusto Villegas
1,650 Points

I don't know what I am missing in this exercise. I am trying to find the square of a number.

squaring.py
def square (number):
       return number * number
result = (square()
print(result) 

1 Answer

Marquis Kimble
Marquis Kimble
1,499 Points

Looks like you are missing a ")" at the end of the defining the result. Code should look like:

def square (number):
       return number * number
result = (square(2))
print(result)