Build a program to design a version of Rock-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.
First ask the user how many games they want to play. This should be an odd number. If the user doesn’t enter an odd 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.
Example of input/output:
Welcome to Rock-Paper-Scissors
How many games of Rock-Paper-Scissors do you want to play? >> 2
Please enter an odd number of games. >> 4
Please enter an 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!
Explain your solution and logic either with in-code comments or in a separate docume
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more