Stuckk on The Big if


#1


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

File "python", line 3
if 5>7
^
SyntaxError: invalid syntax


# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 5>7
     return "True"
        
        # Start coding here!
        # Don't forget to indent
        # the code inside this block!
    elif 5<7:
    return False
    else:      
        return    "HI"
        # Keep going here.
        # You'll want to add the else statement, too!


#2

Don't put so much space between your "if, elif, and else" statements. It should be like this:

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 5>7
     return "True"
    elif 5<7:
    return False
    else:      
        return    "HI"
        # Keep going here.
        # You'll want to add the else statement, too!

And change the "return" statements you put after each if statement to "print". Also every function needs to return something, in this case it asks you to return True. I explained a simpilar problem here:


#3

Hey! Thanks for your help, with a bit of tinkering I did it :smile:


#4

Glad to help! Keep coding! :slight_smile:


#5

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