SHARE
TWEET

Untitled

a guest Jun 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. i = 1
  2. while i != 3:
  3.   if i == 1:
  4.     def main3():
  5.       decision3 = str(input("Do you accept? (Yes or No)"))
  6.       if decision3 == 'No':
  7.           print("narration")
  8.       elif decision3 == 'Yes':
  9.           print("narration")
  10.           i = 2
  11.       else:
  12.           print("Sorry, that is an invalid input. Please re-enter.")
  13.           main3()
  14.     main3()
  15.   else:
  16.       i = 3
  17.       print("narration")
  18.      
  19. if i == 1:
  20.     def main3():
  21.       decision3 = str(input("Do you accept? (Yes or No)"))
  22.       if decision3 == 'No':
  23.           print("narration")
  24.       elif decision3 == 'Yes':
  25.           print("narration")
  26.           i = 2  # <-- This does nothing to i outside of main3()!
  27.       else:
  28.           print("Sorry, that is an invalid input. Please re-enter.")
  29.           main3()
  30.     main3()  # <-- This is the problem!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top