THE BIG IF: the_flying_circus() returned the value None,


#1

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


# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 3!=4:    
        print "The Flying Circus isn%t a myth!" 
        return 
        True
    elif the_flying_circus():
        True or False (3<4)
        print "The Flying Circus is a myth!" 
        return 
        True 
    else:
        print "The Flying Circus doesn%t exist."
        return 
        True


#2

You need return and true on the same line.


#3

Thanks so much. I'd never have figured that out!


#4

Welcome!

You need to do this because Python automatically ends statements for you.

When languages like Java need a semicolon to end statements.

:slightly_smiling:


#5

simply like this :slight_smile:

Make sure that the_flying_circus() returns True

def the_flying_circus():
if the_flying_circus > 1: # Start coding here!
return 3 == (2 + 1) and 2 < 4
# the code inside this block!
elif the_flying_circus < 1:
return
# You'll want to add the else statement, too!
else:
return False

-- verify is OK --


#6

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 81==9**2:    # Start coding here!
        print "IT'S TRUE!!!"
        return
        True
    elif the_flying_circus():
        True or False (3<4)
        print "The flying circus is a myth!"
        return
        True
    else:
        print "The flying circus doesn%t               exist."
        return
        True

i used this code but it keeps on showing the error that the return statement is not mentioned...what to do!?


#7

Just like above, you need "return" and "True" on the same line.
Such as:

return True

Also, I tested your code and I think you shouldn't have the definition in the IF control flow as I believe it creates a loop as I got an error when I tested it.

For instance, you could replace the definition at your "elif" with "(3<4) and (56 == 56)" which also allows a Boolean operator to be included.

If you want to test it for yourself, use 'print the_flying_circus()' at the bottom of your code and then change "81==9**2" so it is not true. With this, the error should occur.

I hope this helps.