THE BIG IF recursion depth


#1


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

HELP


# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if the_flying_circus():    # Start coding here!
        print " 5 == 5"
    elif the_flying_circus():
        print " 5 ==5 and 6==6"
    else:
        print "Hello"
        return True


#2

You are calling the function inside of itself, which causes it to recur until the maximum depth is met.


#3

Thanks! got it to work


#4

Welcome!

Post again if you're confused! :slightly_smiling:


#5

def the_flying_circus():
if the_flying_circus():
print " 1 == 1"

elif the_flying_circus():
    print " 7 ==7 and  3==3"
else: 
    print "Dope"
    return True

error: The following exception was raised when calling the_flying_circus(): RuntimeError: maximum recursion depth exceeded

Please help!


#6

what does the error message mean?


#7

i figured it out. but i wish we had live chat support so that someone can explain what is going on. I am completing the exercises but I am still a little confused.