Jul-07-2017, 06:37 PM
What is wrong with this Rock, Paper, Scissors game?
Ignore the indentation, it got messed up after copying.
Ignore the indentation, it got messed up after copying.
Rock Paper Scissor def game(): import random Dic = (1:"R", 2:"P", 3:"S") PC_Choice = Dic[random.randint(1, 3)] print (PC_Choice) #Debugging print("Please type R for Rock, P for Paper or S for Scissors") User_Choice = input().upper if PC Choice == "R" and User_Choice print("The PC chose rock, its a tie") elif PC_Choice == "R" and User_Choice == "P": print("The PC chose rock, you win.") elif PC_Choice == "R" and User_Choice == "S": print("The PC chose rock, you lose.") elif PC_Choice == "P" and User_Choice == "R": print("The PC chose paper, you lose.") elif PC_Choice == "P" and User_Choice == "P": print("The PC chose paper, its a tie") elif PC_Choice == "P" and User_Choice == "S": print("The PC chose paper, you win.") elif PC_Choice == "S" and User_Choice == "R": print("The PC chose scissors, you win.") elif PC_Choice == "S" and User_Choice == "P": print("The PC chose scissors, you lose.") elif PC_Choice == "S" and User_Choice == "S": print("The PC chose scissors, it's a tie.") else: print("Wait what?") #This is for testing the game game() game() #Game loopsThe output is always 'Wait, what?', although all of the data was entered correctly.