The Big If error


#1



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

The Big If


It gives me an error message of
Oops, try again. The following exception was raised when calling the_flying_circus(): TypeError: 'int' object is not callable
this is an error I've never seen before but I think it has to do with the def the_flying_circus: that comes default in the code.


# Make sure that the_flying_circus() returns True
the_flying_circus = True
def the_flying_circus():
    if 4 < 5 and not 6 > 7():
        print the_flying_circus
    elif the_flying_circus(False):
        print "False"
    else:
         print 'the_flying_circus'


#2

First of all, I don't recommend having the same name used for a variable and a function. It adds to confusions as in are you trying to call the function in the function or using the variable?

Next:

Why is there an empty bracket beside the number?

You need to return True. Not print.


#3

You must return your value as well.


#4

Thanks, i've gotten through it now just by taken the template in the instructions and changing it around to be formatted for the_flying_circus problem


#5

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