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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:20
[a] create a class called “cycle” which has two instance integer variables as properties, “numberofwheels” and “weight.” create a constructor with two parameters, using the same variable names in the parameter list. assign each variable to numberofwheels” and “weight” respectively. write a separate application to test the class and display its properties. note: do not change the names of the instance variables or the variables listed in the constructor’s parameter list. [b] edit your class cycle by adding a default constructor which will assign the default values of 100 to represent the numberofwheels, and 1000 to represent the weight, by invoking a call to the other constructor. modify your application created in [a] to test the class.
Answers: 3
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 17:50
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
You know the right answer?
Write a program that lets the user play the game of rock, paper, scissors against the computer. the...
Questions