Skip to content
← Back to Community
How can I fix my RPS on Python?
Profile icon
hacker
has Hacker Plan
DaxCodes

So when you do paper or scissors, it says "Scissors. You Win!" But I didn't even put that on the lists.

Could someone help me with this problem?

Thanks!

  • DaxCodes
Answered by Spacecraft [earned 5 cycles]
View Answer
Voters
Profile icon
DaxCodes
Comments
hotnewtop
Profile icon
Spacecraft

Your IF statements may not be evaluating properly:

if player == 'Rock' or 'rock': elif player == 'Scissors' or 'scissors': elif player == 'Paper' or 'paper':

Try changing them to look like this:

if player == 'Rock' or player == 'rock': elif player == 'Scissors' or player == 'scissors': elif player == 'Paper' or player == 'paper':
Profile icon
Spacecraft

Alternatively, you could just change your input line to convert the string to lowercase and get rid of the OR conditions inside your IF statements:

player = input("Player: ").lower()
Profile icon
DaxCodes

@Spacecraft
Thanks! I needed that!