Question
design a program ofRock-Paper-Scissors where the user plays the computer. But I want your program to cheat-yes, cheat. Normally in a Rock-Paper- Scissors program the
design a program ofRock-Paper-Scissors where the user plays the computer. But I want your program to cheat-yes, cheat. Normally in a Rock-Paper- Scissors program the user would select Rock, Paper or Scissors and then the computer would select one randomly. But I want your program to let the user select one and the have the computer select the one that wins. So, if the user selects Rock, the computer should select Paper.
Firstask the user how many games they want to play. This should be an odd number. If the user doesn't enter anodd number, give them an error and make them re-enter it. Then play Rock-Paper-Scissors that number of times.
At the end of the program should say who won a majority of the matches.
Here is example input/output that you can use for testing.
Welcome to Rock-Paper-Scissors How many games of Rock-Paper-Scissors do you want to play? >> 2 Please enter >> 4 Please enter >> 3 Game 1 You can pick R - Rock P - Paper S - Scissors >> R The computer Game 2 You can pick R - Rock P - Paper S - Scissors >> P The computer picked Scissors. You lose. Game 3 You can pick R - Rock P - Paper S - Scissors >> S The computer picked Rock. You lose. You won 0 games. Computer won 3 games. Computer wins!
- Turn in the program source code as a .py file.
- Explain your solution and logic either with in-code comments or in a separate document
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started