Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def rps():
- choice_list = ["rock", "paper", "scissors"]
- random_number = random.randint(0,2)
- choice = choice_list[random_number]
- if choice == ("rock") and answer == ("scissors"):
- print("you lose, I had rock")
- if choice == ("rock") and answer == ("paper"):
- print("you win, I had rock")
- if choice == ("paper") and answer == ("rock"):
- print("you lose, I had paper")
- if choice == ("paper") and answer == ("scissors"):
- print("you win, I had paper")
- if choice == ("scissors") and answer == ("paper"):
- print("You lose, I had scissors")
- if choice == ("scissors") and answer == ("rock"):
- print("You win, I had scissors")
- answer = input("type rock, paper, or scissors")
- rps()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement