Call and Response


#1

I dont know what to do here. I dont know how to call the number 10.
Instruction:
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.

`


#2

A call expression looks like,

function_name(arguments)

Eg.

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

#3

I got it! Thank you man, i needed that


#4

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