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 13:30
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
The salespeople at hyperactive media sales all use laptop computers so they can take data with them on the road. you are a salesperson for superduper lightspeed computers talking to hyperactive media sales about upgrading the laptops to windows 10. explain how network location awareness in windows 10 would make the laptops more secure.
Answers: 3
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
Mathematics, 17.05.2021 19:40
question
Mathematics, 17.05.2021 19:40
question
Mathematics, 17.05.2021 19:40
question
English, 17.05.2021 19:40
Questions on the website: 13722359