Answered step by step
Verified Expert Solution
Link Copied!

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 1 and 100 both inclusive (inclusive means that 1 and 100 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 50(half way between 1 and 100).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions