Python Python Basics Functions and Looping Create a Function

Bummer: AssertionError: False is not true : Make sure you call the square function, and pass it 3

Bummer: AssertionError: False is not true : Make sure you call the square function, and pass it 3

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

#def square(number):
#    return((number)*(number))
#result=square(3)
#print(result)

def square(number):
  result =  number*number 
  return result
square(3)

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 59,821 Points

You are very close! The final test says assign the result of the function call to the variable result. Add this assignment and your code should pass.

Post back if you need more help. Good luck!!!