Call and Response. I'm stuck on this, help me


#1

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.

square(10)

I'm getting this message Oops, try again.
Did you remember to call square(10) on line 9?


#2

Hi @gwakisa ,

Because the code that you posted is not formatted, it is difficult for other users to read and debug it. After code has been pasted into the editing window for posting, you can format it by selecting it, and then by clicking the </> button above the editing area. Alternatively, you can place three backquotes on the line before the code and three backquotes on the line after the code. This will enable us to see important details, such as the indentation and underscores. If you use the backquotes, your code will be color-coded, making it especially easy to read.

To call a function, specify the name of the function followed by parentheses. If the function takes parameters, put corresponding argument(s) within the parentheses. In this exercise, you can do this ...

square(10)

#3

@ appylpye
thanks a lot, it took me 2 hours figuring whats is wrong....


#4

DO NOT INDENT square(10)
keep it far left


#6

Thanks It worked for me


#7

I can't finish this step, because every single time I try this:

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.

square(10)

Show this message:

"Oops, try again. Did you remember to call square(10) on line 9?"

Please help


#8

Guys, I figure out whats ir wrong. Just Identation.


#9

i have made the same mistake, what took me lots of time~~
what a pity~