Calling a function in python


#1

def square(n):
"""Returns the square of a number."""
squared = n**2
print "%d squared is %d." % (n, squared)
return squared
square()

Call the square function on line 9! Make sure to

include the number 10 between the parentheses.

square(10)

throws and error message " Oops, try again.
Did you remember to call square(10) on line 9?"
what might be the problem . help


#2

Please format your code correctly :slight_smile:


#3

how ..I keep putting 10 inbetween the brackets but it still gives me a error


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.