Is there any difference b/w below code blocks? I run 1st block, it throws "Oops, try again. The following exception was raised when calling the_flying_circus(): RuntimeError: maximum recursion depth exceeded while calling a Python object" while 2nd does not.
> # Make sure that the_flying_circus() returns True > def the_flying_circus(): > decision = raw_input("Do you want to go to the flying circus?") > if decision == "Yes" or decision == 'Y': > print "OK, we'll go!" > elif decision == "No" or decision == 'N': > print "OK, see you next time!" > else: > print "Invalid decision. Please input Yes or No" > the_flying_circus() > the_flying_circus()
> def clinic(): > print "You've just entered the clinic!" > print "Do you take the door on the left or the right?" > answer = raw_input("Type left or right and hit 'Enter'.").lower() > if answer == "left" or answer == "l": > print "This is the Verbal Abuse Room, you heap of parrot droppings!" > elif answer == "right" or answer == "r": > print "Of course this is the Argument Room, I've told you that already!" > else: > print "You didn't pick left or right! Try again." > clinic() > clinic()