Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
PROGRAM SPECIFICATION Rock, Paper, Scissors, Lizard, Spock Game The game is an expansion on the game Rock, Paper, Scissors. Each player picks a variable and
PROGRAM SPECIFICATION Rock, Paper, Scissors, Lizard, Spock Game The game is an expansion on the game Rock, Paper, Scissors. Each player picks a variable and reveals it at the same time. The winner is the one who defeats the others. In a tie, the process is repeated until a winner is found. Write a program that lets the user play the game of Rock, Paper, Scissors, Lizard, Spock against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 5 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. If the number is 4, then the computer has chosen lizard. If the number is 5, then the computer has chosen Spock. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", "scissors", "lizard", or "Spock" at the keyboard. (Please use a menu) 3. The computer's choice is displayed 4. A winner is selected according to the following rules: . If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)
![image text in transcribed](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66ddf5a3a5e97_37166ddf5a30ca14.jpg)
![image text in transcribed](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66ddf5a4756c2_37166ddf5a3d21cb.jpg)
![image text in transcribed](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66ddf5a56343c_37266ddf5a4cedc3.jpg)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started