Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. import random
  2.  
  3.  
  4. def rps():
  5. choice_list = ["rock", "paper", "scissors"]
  6. random_number = random.randint(0,2)
  7. choice = choice_list[random_number]
  8. if choice == ("rock") and answer == ("scissors"):
  9. print("you lose, I had rock")
  10. if choice == ("rock") and answer == ("paper"):
  11. print("you win, I had rock")
  12. if choice == ("paper") and answer == ("rock"):
  13. print("you lose, I had paper")
  14. if choice == ("paper") and answer == ("scissors"):
  15. print("you win, I had paper")
  16. if choice == ("scissors") and answer == ("paper"):
  17. print("You lose, I had scissors")
  18. if choice == ("scissors") and answer == ("rock"):
  19. print("You win, I had scissors")
  20.  
  21. answer = input("type rock, paper, or scissors")
  22.  
  23.  
  24. rps()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement