I have here a rather simple rock, paper, scissors program where I am having some trouble with if statements. For some reason, when I enter rock, paper, or scissors (True Values)
The conditions in if
are wrong.
Consider the if
statement with parentheses:
if ('rock') or ('paper') or ('scissors' not in player):
It will always return True
because rock
will always be true.
You need to swap conditions' operands
if player not in computer:
After this swap, this line becomes irrelevant (and also its conditions are wrong) You need to remove it:
if player == 'rock' or 'paper' or 'scissors':