Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- while True:
- choice = []
- choice.append(int(input("Enter choice as a number 1. Rocks, 2. Paper, 3. Scissors: ")))
- choice.append(randint(1,3))
- if (((choice[0] == 1) and (choice[1] == 3)) or ((choice[0] == 3) and (choice[1] == 2)) or ((choice[0] == 2) & (choice[1] == 1))):
- print("Winner!")
- elif choice[0] == choice[1]:
- print("Retry")
- else:
- print("Loser!")
- if(input("Do you want to continue? Y/N: ") == "N"):
- break
Add Comment
Please, Sign In to add comment