SyntaxError: 'return' outsde function - Please Help!


This is the link to the exercise ->

This is what my code looks like vv

print "What is one plus one?"
def the_flying_circus(answer):2
if answer == 2:
return True
elif answer != 2:
return False
print "Wait what!?"

I am sure all my indents are good, but it still keeps saying that the return is outside the function. Thanks in advance!


this is currently your function + content:

def the_flying_circus(answer):2

shouldn't the if, elif and else also be part of the function content?


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