subject

Write a program that lets the user play the game of rock, paper, scissors against the computer. the program should work as follows. 1. when the program begins, a random number is ranged of 1 through 3 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. (donât display the computerâs choice yet.) 2. the user enters his or her choice of "rock", "paper", or "scissors" at the key-board. (you can use a menu if you prefer.) 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.) ï· if one player chooses paper and the other player chooses rock, then paper wins. (paper wraps rock.) ï· if both players make the same choice, the game must be played again to determine the winner. 5. be sure and use a looping structure so that the game can be played multiple times. keep track of number of wins by player and computer so you can display that as the games progress

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:30, juliannxkim
Which group on the home tab allows you to add shapes to a powerpoint slide?
Answers: 1
image
Computers and Technology, 22.06.2019 11:20, destinyleisantos
The kurt vonnegut commencement speech, the neiman-marcus chocolate chip cookie recipe, and the get-well emails to the dying boy are examples of select one: a. social engineering b. hoax emails c. email viruses d. worms
Answers: 1
image
Computers and Technology, 22.06.2019 15:00, miracle9704
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, sebcbal
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
You know the right answer?
Write a program that lets the user play the game of rock, paper, scissors against the computer. the...

Questions in other subjects: