Advertisement
facedwarrior193

Rock paper scissors

Feb 28th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. # rock paper scissors
  2.  
  3. import random
  4.  
  5. rob = random.randint(1,3)
  6. print("Computer has chosen its decision\n")
  7. user = int(input("Pick: Rock(1),Paper(2) or Scissors(3)\n"))
  8.  
  9. if rob == 1:
  10.     print("Robo pics Rock")
  11. elif rob == 2:
  12.     print("Robo pics Paper")
  13. else:
  14.     print("Robot pics Scissors")
  15.  
  16. if user == 1 and rob == 2 or user == 2 and rob == 3 or user == 3  and rob == 1:
  17.     print("You lose!")
  18. elif user == rob:
  19.     print("Its a draw!")
  20. else:
  21.     print("You win!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement