Can somebody tell me what's wrong with my syntax? The instructions also say that the final result has to output the value "True"


File "python", line 10
else chicken>5:

SyntaxError: invalid syntax

I expected the code to run just fine.

def the_flying_circus(chicken):
 if chicken>4 and 3<4:
    return "haha you silly guy!"
 elif chicken<=5:
    return "True"
else chicken>5:
return "Nope"


The syntax for your else statement is invalid.

Else statement example:

if condition:
    do something in here
    default condition


Thanks man! I ended up getting it once I looked back into previous lessons.


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