Guest User

Untitled

a guest
Oct 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. from random import randint
  2.  
  3. while True:
  4. choice = []
  5. choice.append(int(input("Enter choice as a number 1. Rocks, 2. Paper, 3. Scissors: ")))
  6. choice.append(randint(1,3))
  7.  
  8. if (((choice[0] == 1) and (choice[1] == 3)) or ((choice[0] == 3) and (choice[1] == 2)) or ((choice[0] == 2) & (choice[1] == 1))):
  9. print("Winner!")
  10. elif choice[0] == choice[1]:
  11. print("Retry")
  12. else:
  13. print("Loser!")
  14.  
  15. if(input("Do you want to continue? Y/N: ") == "N"):
  16. break
Add Comment
Please, Sign In to add comment