Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Greetings Professor Falken. Do you want to play a game? You, the user will think of a number between 1 and 1 0 0 both
"Greetings Professor Falken.
Do you want to play a game?
You, the user will think of a number between and both inclusive inclusive means that and are also valid values for input
The computer is going to try to guess what the number is that you are thinking of
To accomplish this, you will write a program that will take as the input, the number you are thinking of
The program you will write will output a series of guesses, until the correct number is found.
BUT! The program you will write will not be just a series of random guesses. Instead. you will write an intelligent program that will guess the number you are thinking of in as few tries as possible.
The program will prompt for the number you are thinking of and the computer will display its guesses.
The program will output the computers current guess and will output if the current number is less than or higher than the number the user was thinking.
The program will be written so that the computer guesses are half way of each iteration.
The computer will always start with guessing half way between and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started