Question: Write a python program which do the following: In a rock-paper-scissors game, paper beats rock, rock beats scissors and scissors beat paper.Write a program to
Write a python program which do the following:
In a rock-paper-scissors game, paper beats rock, rock beats scissors and scissors beat paper.Write a program to play rock-paper-scissors.This game is played by two players.Player 1 enters his choice first, followed by player 2.Ask the players to enter R for rock, P for paper or S for scissors.The players can enter either uppercase or lowercase letter.If any user enters something other than those three letters, the game is canceled for invalid entry.Otherwise, determines and displays the outcome (player 1 wins, player 2 wins or tie). The following are three examples.

Player 1: Enter R for rock, P for paper or S for scissors: R Player 2: Enter R for rock, P for paper or S for scissors: 5 Player 1 has won the game. Player 1: Enter R for rock, P for paper or S for scissors: r Player 2: Enter R for rock, P for paper or S for scissors: R Tie Player 1: Enter R for rock, P for paper or S for scissors: p Player 2: Enter R for rock, P for paper or S for scissors: X Game canceled because of invalid entry
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
