Handling Invalid Input in Rock Paper Scissors Game

Invalid Input Handling: If the user types something that’s not ‘rock’, ‘paper’, or scissors’, we show an error message . Tie Condition: If both choices are the same, it’s a tie. Winning and Losing Conditions: Using nested if statements, we compare the Spacebar clicker user’s choice with the computer’s choice to decide the winner. The problem is that it sometimes reads “scissors” as an invalid input, which seems to me completely randomly and i dont know what the problem is.

1 Like