The Big If Problems


Every time i try this happens:
Oops, try again. The following exception was raised when calling the_flying_circus(): RuntimeError: maximum recursion depth exceeded

I thought that it would work but apparently I was wrong. Can anyone help?

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if the_flying_circus() != True or False:
        print 'printed'
        # Don't forget to indent
        # the code inside this block!
    elif the_flying_circus() == (666 < 667) and not (1 != 1):
        print 'correct'
        # Keep going here.
        # You'll want to add the else statement, too!
        print 'You failed'



if the_flying_circus()

you call the function inside the function, this is known as recursion. Given you have no base case, the recursion has a similair effect as an infinity loop


Thanks! This really helped.


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