Guest User

Untitled

a guest
Oct 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. # Two player Rock-Paper-Scissors game
  2. while True:
  3. names , choice = ([] for _ in range(2))
  4. for i in [0,1]:
  5. names.append(input("Enter your name: "))
  6. choice.append(int(input("Enter choice as a number 1. Rocks, 2. Paper, 3. Scissors: ")))
  7.  
  8.  
  9. if (((choice[0] == 1) and (choice[1] == 3)) or ((choice[0] == 3) and (choice[1] == 2)) or ((choice[0] == 2) & (choice[1] == 1))):
  10. print("Congratulations! {}".format(names[0]))
  11. elif choice[0] == choice[1]:
  12. print("Retry")
  13. else:
  14. print("Congratulations! {}".format(names[1]))
  15.  
  16. if(input("Do you want to continue? Y/N: ") == "N"):
  17. break
Add Comment
Please, Sign In to add comment