Call and Response


#1


https://www.codecademy.com/courses/python-beginner-c7VZg/1/2?curriculum_id=4f89dab3d788890003000096

Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: name 'squre' is not defined

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


I've been stuck on this for three days now and don't know what to do. I have tried these two types to submit but none of them work. I think the 1st one is okey but it doesn't work. what am i doing wrong?


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.
squre(10)



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.
    print squre(10)


#2

Hahahahahaha... It's too bad to be stuck in a lesson for too long :stuck_out_tongue: I know full well what it's like.
Your error is here:

squre(10)

It has to look like this:

square(10);

1* The name of your function is wrong.

2* Missing semicolon after "square(10);"


#3

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.

squre(10):

like this?
it's not working either


#4

You wrote the word "square", wrong!
You wrote "square" instead of "square"


#5

are you kidding with me now? 3 of your square has the same spelling


#6

No seu código está " squre(10) ", ou seja, está faltando a vogal " a "!


#7

ow you were right. but still it didn't work

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):


#8

thanks for your time and help. got it finally working. removed the colon and it is submitted :smile: sorry for being rude. i was angry to be stuck for 3 day..


#9

It is score and comma
like this: " ; "


#10

it worked without them


#11

Alright haha I understand your frustration: D


#12

thanks for your help. bye


#13

its not squre its square thats where you lost it pal:joy::joy:


#14

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