Question: Write a program in python code for an inverse guessing game in which the player chooses a number between 1 and 10 in their mind
Write a program in python code for an inverse guessing game in which the player chooses a number between 1 and 10 in their mind and the computer tries to guess that number. The computer should suggest a number and the player indicates if it is 1) too big, 2) too small or 3) correct. The player's response should be read as user input. If the number is correct (computer guesses correctly), the program should terminate. If not then the computer should ask another number repeatedly. The computer only has three attempts to guess the right number. (The computer will use a strategy alike to Binary Search. A random number can be used for the computer to select the first number, but it should follow steps of Binary Search to guess the next numbers.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
