subject

In this assignment, you are to write a program that guesses what you have in your mind. No, computers can't read your mind; but at least guess a number you have in mind given that you tell the program whether the number the program guessed is higher or lower than your number. Since humans are much more creative than the computer applications, we will level the playing field by limiting the number we select to be in between 1 and 100.The program should work as following: 1. You will pick a number between 1 and 100. This number should never be used in your program 2. The program should pick a random number in between 1 and 100. 3. The program asks user whether the number is correct, higher, or lower 4. If it is the correct guess, print "Correct guess" and exit out of the program. 5. If not correct, answer "h", or "l" to indicate the guess is either higher or lower than the correct number. 6. If lower, then the next number should be higher than the previous guess. 7. If higher, then the next number should be lower than the previous guess. 8. Repeat steps 3 through 7 until the correct guess is made. 9. The program should keep track of the number guesses made until the correct guess. 10. Capture screen outputs of all guesses and responses along with the final number of guesses taken,

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
You know the right answer?
In this assignment, you are to write a program that guesses what you have in your mind. No, computer...
Questions
question
English, 04.12.2020 07:40
question
Physics, 04.12.2020 07:40
question
Mathematics, 04.12.2020 07:40
question
Mathematics, 04.12.2020 07:40
question
Mathematics, 04.12.2020 07:40
Questions on the website: 13722362