Make sure that the_flying_circus() returns True def the_flying_circus(answer): if answer<5: print "True" elif 5==5 and 7==8: print "False"# Keep going here. else print "suck it"
Your else statement is indented incorrectly, and the function should
return True. Might want to consider putting that in somewhere.
Python depends on whitespace. (One of the flaws of the language IMO) Like the other guy said, indent the else. Otherwise Python tries to start it as a new statement, and you can't have an else without an if. You are also missing a semicolon after your else.
if (condition): pass elif (condition2): pass else: pass
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.