Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Build a program to design a version ofRock-Paper-Scissors where the user plays the computer. But I want your program to cheat-yes, cheat. Normally in a

Build a program to design a version 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 and odd number of games. >> 4 Please enter and odd number of games. >> 3 Game 1 You can pick R - Rock P - Paper S - Scissors >> R The computer picked Paper. You lose. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

global market strategy?

Answered: 1 week ago

Question

Teachers Role?

Answered: 1 week ago

Question

International conference on population and development ?

Answered: 1 week ago

Question

Approach to population ?

Answered: 1 week ago

Question

The concept of development ?

Answered: 1 week ago