Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Two player Rock-Paper-Scissors game
- while True:
- names , choice = ([] for _ in range(2))
- for i in [0,1]:
- names.append(input("Enter your name: "))
- choice.append(int(input("Enter choice as a number 1. Rocks, 2. Paper, 3. Scissors: ")))
- if (((choice[0] == 1) and (choice[1] == 3)) or ((choice[0] == 3) and (choice[1] == 2)) or ((choice[0] == 2) & (choice[1] == 1))):
- print("Congratulations! {}".format(names[0]))
- elif choice[0] == choice[1]:
- print("Retry")
- else:
- print("Congratulations! {}".format(names[1]))
- if(input("Do you want to continue? Y/N: ") == "N"):
- break
Add Comment
Please, Sign In to add comment