Jul-10-2017, 09:55 AM
I apologize for the delay. Here is the clean code from my pc.
#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 == "R": print("The PC chose rock, it's 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, it's 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 loops
Output:Wait, what?