Question: USING PYTHON Instructions Modify the guessing-game program so that the user thinks of a number that the computer must guess. The computer must make no

USING PYTHON

USING PYTHON Instructions Modify the guessing-game program so that the user thinks

of a number that the computer must guess. The computer must make

no more than the minimum number of guesses, and it must prevent

Instructions Modify the guessing-game program so that the user thinks of a number that the computer must guess. The computer must make no more than the minimum number of guesses, and it must prevent the user from cheating by entering misleading hints. Use I'm out of guesses, and you cheated and Hooray, I've got it in X tries as your final output. (Hint: Use the math.log function to compute the minimum number of guesses needed after the lower and upper bounds are entered.) Below are two test runs of the program: Enter the smaller number: 0 Enter the larger number: 10 0 10 Your number is 5 Enter =, > 34 Your number is 3 Enter =, : = Hooray, I've got it in 3 tries! Enter the smaller number: 0 Enter the larger number: 50 0 50 Your number is 25 Enter =, > 1 1 Your number is 1 Enter =, > I'm out of guesses, and you cheated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!