Can you check my code i get the error message:


#1



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


oops try again, the_flying_circus() returned the value None, did you forget to add return statement?


# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if not (2<3) and 1<2:    # Start coding here!
        print "this really is true"
        # Don't forget to indent
        # the code inside this block!
    elif 2<3:
        print "that is true."
        # Keep going here.
        # You'll want to add the else statement, too!
    else:
        print "None of the above."


#2

Finally, the_flying_circus() must return True when evaluated.

# Make sure that the_flying_circus() returns True

oops try again, the_flying_circus() returned the value None, did you forget to add return statement?

You need to return True back when the condition runs...you aren't returning anything.

Refer to Python Syntax, 6. Whitespace Means Right Space for an example of how to return a value.
https://www.codecademy.com/en/courses/introduction-to-python-6WeG3/1/2


#3

can you check my code. Is this what its suppose to do?

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if not (2<3) and 1<2:    # Start coding here!
        print "this really is true"
        return True
        # Don't forget to indent
        # the code inside this block!
    elif 2<3:
        print "that is true."
        return True
        # Keep going here.
        # You'll want to add the else statement, too!
    else:
        print "None of the above."
        return True
the_flying_circus()

#4

Well, it works for me..


#5

Yep. As @funct1on said, works. Doing "print" is optional, the exercise just wants "return". :grin: good job!


#6

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