Stuck on "Function Junction"


I formatted my code EXACTLY like in the example, but it gives me this error:

File "python", line 5
def spam
SyntaxError: invalid syntax

My code should print the string "Eggs!" but the error says I have "invalid syntax", even though I formatted the code just like in the example.

# 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 "Eggs!"
    """Prints 'Eggs!' to the console."""

# Define the spam function above this line.


The block should begin with a colon, not a semi-colon.

def spam():


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