Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- x = int(input("Has power? YES[1] NO[2] \n"))
- if x == 1: break
- y = int(input("Is plugged in? YES[1] NO[2]: \n"))
- if y > 1:
- print("Plug it in")
- continue
- z = int(input("Is the switch on? YES[1] NO[2]: \n"))
- if z > 1:
- print("Turn switch on")
- continue
- a = int(input("Fuse OK? YES[1] NO[2] \n"))
- if a > 1:
- print("Check fuse")
- continue
- else:
- break
- print("Seek other help")
- =================================
- while True:
- x = int(input("Has power? YES[1] NO[2] \n"))
- if x == 1:
- break
- elif x > 2:
- print("INVALID")
- continue
- y = int(input("Is plugged in? YES[1] NO[2]: \n"))
- if y == 2:
- print("Plug it in")
- continue
- elif y > 2:
- print("INVALID: RETURNING TO THE TOP \n")
- continue
- z = int(input("Is the switch on? YES[1] NO[2]: \n"))
- if z == 2:
- print("Turn switch on")
- continue
- elif z > 2:
- print("INVALID: RETURNING TO THE TOP \n")
- continue
- a = int(input("Fuse OK? YES[1] NO[2] \n"))
- if a == 2:
- print("Check fuse")
- continue
- elif a == 1:
- break
- else:
- print("INVALID: RETURNING TO THE TOP \n")
- continue
- print("Seek other help")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement