Question: Build a program that plays Rock, Paper, Scissors. The program should first accept an integer input from player 1. Then, it should accept an integer

Build a program that plays Rock, Paper, Scissors. The program should first accept an integer input from player 1. Then, it should accept an integer input from player 2. For each input, the value 1 represents "rock", 2 represents "paper", and 3 represents "scissors". All other values are invalid. If either player inputs an invalid value, the program should print Error and stop executing.

The program should then determine the winner of the game. If both players choose the same option, the program should print Tie. Otherwise, the program should print either Player 1 Wins or Player 2 Wins, whichever is appropriate for the situation. For example, if player 1 inputs 2, representing "paper", and player 2 inputs 3, representing "scissors", the correct output is Player 2 Wins because scissors beats paper according to the rules of the game.

In python please!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!