import time def get_yes_or_no(): output=input("Please Answer 'Yes' or 'No':") if (output == 'Yes') or (output == 'yes') or \ (output == 'y') or (output == 'Y'): return(True) else: if (output == 'No') or (output == 'no') or \ (output == 'n') or (output == 'N'): return(False) else: print("Your answer is unclear, \ but we think you mean 'no'") return(False) def print_ending1(): print('''After traveling for the rest of the day, \ she found a cave and lived off roots and fungi until \ she was rescued''') def main(): print('''Starving and Exhausted, Goldilocks found a cottage in the middle of the forest. Nobody was home.''') print("Should she enter the cottage?") if not get_yes_or_no(): print_ending1() else: print('''She finds some porridge and eats it. Then she breaks some furniture''') print('''After that, she is very tired. Should she rest for a few minutes in one of the beds?''') if not get_yes_or_no(): print_ending1() else: print('''She wakes up surrounded by 3 angry talking bears''') print('''Should she apologize?''') if get_yes_or_no(): print('''She works for the bears as a servant for one month to pay for the damage''') print_ending1() else: print('''The sheriff is called. Goldilocks goes to jail for trespassing and destruction of private property''') time.sleep(5) main()