HELP! I don't know what's wrong!


#1

I am working on "The Big If" in Python, which is the last part in Conditionals and Control Flow/
https://www.codecademy.com/courses/python-beginner-BxUFN/4/1?curriculum_id=4f89dab3d788890003000096#

I have checked and revised and changed my code so many times, and I still have no idea what I've done wrong. It keeps saying that the_flying_circus() returned the value "None" as the error message. IDK how it even gets that.

If it was working correctly, it should print P1, and I have made it absolutely certain that the error is not on my hand. The code is not wrong and the expression will return True, like the instructions ask. Here is my code below:

def the_flying_circus():
    if (1 != 1) or (2 > 3) is not True:
        print "P1"
    elif (1 == 1) or (2 < 3) is False:
        print "P2"
    else:
        print "P3"

If you have any idea how to help, please tell me. Thanks.


#2

The instructions ask us to return True, which is what the lesson checker is expecting.


#4

@mtf, is it also posssible that the parenthesis in the if statements could throw an error?


#5

I should not matter to Python. That won't raise any errors. Follow the instructions and return True.


#7

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