Call and Response


I dont know what to do here. I dont know how to call the number 10.
We've set up a function, square. Call it on the number 10 (by putting 10 between the parentheses of square()) on line 9!

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

Call the square function on line 9! Make sure to

include the number 10 between the parentheses.



A call expression looks like,



print squared(10)    # the return value will be printed


I got it! Thank you man, i needed that


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