2/19 i'm stuck!


#1

This is what I've writen:

def spam():
"""prints 'eggs' to the console. let's see if it works"""
print "Eggs!"

It says name 'spam' is not defined help please!


#2

Can you type in your whole code for this exercise, please? Preformate your code as well please.


#3

what is it asking you to do?


#4

the comment says """prints 'eggs' to the console. let's see if it works"""

you have "Eggs!". when its asking you to enter "eggs"


#5

don't worry I've solved it. The thing is that in the program I wrote print "Eggs!" with spaces before it so it didn't work :ยท)


#6

I had the same problem. It's confusing because the example screenshot shows the print line as indented. When you remove the indent it works fine.


#7

thank you, I had the same problem.


#8

I wrote your answers, and still don't understand what's wrong :neutral_face:


#9

please help me this is my code

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

it wont work please help