
Rock Paper Scissors Game
This program will have a user play against a computer in a game of rock paper scissors.
rock = 0
paper = 1
scissors = 2
computerwin = 0
userwin = 0
tie = 0
choices = ["rock", "paper", "scissors"]
print("Hi welcome to Royce's rock paper scissors game")
for x in range (1,6,1):
user = str(input("Rock, paper, or scissors?"))
import random
rand = random.randint(0,2)
compchoice = choices[rand]
if compchoice == choices[1]:
if user == choices[rock]:
print("The computer picked paper You lose sorry")
computerwin = computerwin + 1
if user == choices[scissors]:
print("You win the computer picked paper!")
userwin = userwin + 1
if user == choices[paper]:
print("oops you both picked paper go again!")
tie = tie + 1
if compchoice == choices[2]:
if user == choices[rock]:
print("You win the computer picked scissors!")
userwin = userwin + 1
if user == choices[paper]:
print("The computer picked scissors you lose!")
computerwin = computerwin + 1
if user == choices[scissors]:
print("oops you both picked scissors go again!")
tie = tie + 1
if compchoice == choices[0]:
if user == choices[paper]:
print("You win the computer picked rock")
userwin = userwin + 1
if user == choices[scissors]:
print("The computer picked rock you lose sorry")
computerwin = computerwin + 1
if user == choices[rock]:
print("oops you both picked rock go again!")
tie = tie + 1
print("you picked " + user)
print("the computer picked " + compchoice)
print("you won " + str(userwin) + " games")
print("the computer won " + str(computerwin) + " games")
print("you both tied " + str(tie) + " games")
print("thanks for playing")