The Big F - Help needed


#1

Can someone tell me what I'm doing wrong, I can't seem to figure it out:

Link to exercise:
https://www.codecademy.com/courses/python-beginner-BxUFN/4/1?curriculum_id=4f89dab3d788890003000096#

Error receiving:
Oops, try again. the_flying_circus() returned the value None, did you forget to add a return statement?

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 5 < 9:    # Start coding here!
        # Don't forget to indent
        # the code inside this block!
        print "The is correct"
    elif 5 == 5 and 5 < 9:
        # Keep going here.
        # You'll want to add the else statement, too!
        print "This is also correct"
    else:
        print "This is INCORRECT"

#2

i don't see a return anywhere? The exercise expects a certain value (True) returned by the code:

# Make sure that the_flying_circus() returns True

its in a comment and in the error message


#3

oh yes I did, let me try that.


#4

I think my brain is not working... I'm trying this now but it's probably completely wrong lol.


Make sure that the_flying_circus() returns True

def the_flying_circus():
if 5 < 9: # Start coding here!
# Don't forget to indent
# the code inside this block!
return "True"
elif 5 == 5 and 5 < 9:
# Keep going here.
# You'll want to add the else statement, too!
return "True"
else:
return "False"
print the_flying_circus()



#5

this:

return "True"

will return a string, you should return a Boolean value


#6

I tried to add return True, return "True". None of them work. I keep getting the same message."
Oops, try again. the_flying_circus() returned the value None, did you forget to add a return statement?"


#7

I get it now. You have to write "return True" everywhere. In the If, the Elif and the Else section of the code as well, because the "Finally, the_flying_circus() must return True when evaluated."


#10

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