MrThoe

Python Story Template Example

Dec 3rd, 2020
679
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def greet():
  2.   print("Part 1 or Part 2?")
  3.   ans = input("(1) or (2)")
  4.   if ans == "1":
  5.     partOne()
  6.   else:
  7.     partTwo()
  8.  
  9. def partOne():
  10.   print("You entered part 1")
  11.   print("Go to Part 3 or 4?")
  12.   ans = input("(3) or (4)")
  13.   if(ans == "3"):
  14.     partThree()
  15.   elif ans == "4":
  16.     partFour()
  17.   else:
  18.     print("Please enter 3 or 4")
  19.     partOne()  #Send it back to the  (Recursion)
  20.  
  21. def partTwo():
  22.   print("You entered part 2")
  23.  
  24. def partThree():
  25.   print("You entered part 3")
  26.  
  27. def partFour():
  28.   print("You entered part 4")
  29.  
  30.  
  31. greet()
RAW Paste Data