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, 23.06.2019 06:00
Which statement is true of web-based social media? a.they allow consumers to interact with and update content. b.they cannot be updated easily, as compared to print media. c.they are expensive to produce and maintain, as compared to print and television. d.they can exist independent of the internet.
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
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, 27.09.2021 05:30
question
Mathematics, 27.09.2021 05:30
question
Mathematics, 27.09.2021 05:30
question
Mathematics, 27.09.2021 05:30
question
Mathematics, 27.09.2021 05:30
question
Mathematics, 27.09.2021 05:30
question
English, 27.09.2021 05:30
question
Mathematics, 27.09.2021 05:30
Questions on the website: 13722361