2/19 Doesn't work nore does 3/10. Help anyone?


#1

I tried both my friend completed it with the same code but it doesn't work.


#2

Please present the code you are using....


#3

Define your spam function starting on line 5. You

can leave the code on line 11 alone for now--we'll

explain it soon!

spam()
def spam():
"""print 'spam' to the console."""
print "Eggs!"

Define the spam function above this line.

spam()


#4

@leonhard_wettengmx_n


#5

I have cracked the code literally. Thanks for helping. I had to change spam() to print like 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)


#6

That was 3/19 this is 2/19. . .

Define your spam function starting on line 5. You

can leave the code on line 11 alone for now--we'll

explain it soon!

def spam():
"""print 'spam' to the console."""
spam = "Eggs!"

Define the spam function above this line.

print spam


#7

This correctly

def spam():
"""Prints 'spam' to the console."""
spam = "Eggs!"

Define the spam function above this line.

print "Eggs!"


#8

Please re-edit your Post

  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.


#9

White space will count
def spam():
"""Prints 'spam' to the console."""
spam = "Eggs!"

Define the spam function above this line.

print "Eggs!"