subject

You work for a professional psychic. Unfortunately, this particular psychic has trouble reading minds, which is a service she would like to offer her clients. The psychic hires you to write a script that will correctly guess an unknown integer that has been picked by her client. The script should accept a lower and upper bound which is provided by the client and should use the minimum number of guesses to discover the unknown integer. The unknown integer will always lie within the lower and upper bounds specified by the client. The script should not have access to the unknown integer when the code initially runs. The client can give input in only two ways: specifying the lower and upper bounds; and by answering yes/no questions. Write the code to perform this task.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:00, jeffylovesgreenbeans
What computer network component allows data transfers from one computer to another through a telephone line?
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, ranmmm
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
image
Computers and Technology, 23.06.2019 18:40, brooklyn4932
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
image
Computers and Technology, 23.06.2019 18:50, annieleblanc2004
Ais a picture icon that is a direct link to a file or folder
Answers: 1
You know the right answer?
You work for a professional psychic. Unfortunately, this particular psychic has trouble reading mind...

Questions in other subjects:

Konu
Physics, 15.10.2019 05:00