Advertisement
toxiCK

headache.py

Jan 26th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. while True:
  2.  
  3. x = int(input("Has power? YES[1] NO[2] \n"))
  4. if x == 1: break
  5.  
  6. y = int(input("Is plugged in? YES[1] NO[2]: \n"))
  7. if y > 1:
  8. print("Plug it in")
  9. continue
  10. z = int(input("Is the switch on? YES[1] NO[2]: \n"))
  11. if z > 1:
  12. print("Turn switch on")
  13. continue
  14. a = int(input("Fuse OK? YES[1] NO[2] \n"))
  15. if a > 1:
  16. print("Check fuse")
  17. continue
  18. else:
  19. break
  20.  
  21. print("Seek other help")
  22.  
  23.  
  24. =================================
  25.  
  26.  
  27. while True:
  28.  
  29. x = int(input("Has power? YES[1] NO[2] \n"))
  30. if x == 1:
  31. break
  32. elif x > 2:
  33. print("INVALID")
  34. continue
  35.  
  36. y = int(input("Is plugged in? YES[1] NO[2]: \n"))
  37. if y == 2:
  38. print("Plug it in")
  39. continue
  40. elif y > 2:
  41. print("INVALID: RETURNING TO THE TOP \n")
  42. continue
  43. z = int(input("Is the switch on? YES[1] NO[2]: \n"))
  44. if z == 2:
  45. print("Turn switch on")
  46. continue
  47. elif z > 2:
  48. print("INVALID: RETURNING TO THE TOP \n")
  49. continue
  50. a = int(input("Fuse OK? YES[1] NO[2] \n"))
  51. if a == 2:
  52. print("Check fuse")
  53. continue
  54. elif a == 1:
  55. break
  56. else:
  57. print("INVALID: RETURNING TO THE TOP \n")
  58. continue
  59.  
  60. print("Seek other help")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement