subject

Write a program for playing a game with the computer. first, generate a random integer in the range of 6 through 9. this will be the computer’s pick. then generate three random integers for the human player. these random integers are in the range of 1 through 10. if any of these three random integers is greater than the computer’s pick, the human player wins the game. otherwise, the human player loses. you must use a for loop to generate these three random integers. in each iteration, generate and display one random integer. if it is larger than the computer’s pick, display "you have won the game" and break out of the loop. if the human player cannot get a random integer larger than computer’s pick after three iterations , display "sorry you have lost the game".

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
When jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor?
Answers: 1
question
Computers and Technology, 22.06.2019 06:30
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Which one of the following functions is not available on the autosum tool? sum average if max
Answers: 3
You know the right answer?
Write a program for playing a game with the computer. first, generate a random integer in the range...
Questions
question
History, 31.10.2019 08:31
question
Mathematics, 31.10.2019 08:31
Questions on the website: 13722359