Question: Hello! I need helps on this question. Please concern to all the requirements and the question are asking for, and make sure it works. I

Hello! I need helps on this question. Please concern to all the requirements and the question are asking for, and make sure it works. I got a few feedback that the code couldn't run or missing.

Thank you so much!

Hello! I need helps on this question. Please concern to all the

requirements and the question are asking for, and make sure it works.

I got a few feedback that the code couldn't run or missing.

1. Task Write a file named higher_lower_player.py that plays a simple guessing game with you. The game is the same as the previous assignment, but the roles are reversed: you think of the number, the computer guesses. Before the game begins, the computer should ask how many guesses it gets If the computer loses, it should ask what the correct answer was. It should also check to make sure that the answer is legal, and complain if it wasn't. If the user gives inconsistent answers, the computer should complain and stop playing n addition to functional correctness, some points will be reserved for 1. having good variable names 2. having meaningful docstrings for any functions you write (note: functions are not required for this assignment, but might make sense) 2. Algorithm The optimal strategy for a game like this, assuming you don't know the person thinking of the number well enough to make an informed guess, is as follows. Keep track of the range of possible numbers (initially 1 to 100) Always guess the middle of that range Move one endpoint of the range or the other based on the user response 3. Example Invocations An example run of the program might look like Think of a number between 1 and 100 and I'11 guess it. How many quesses do I get? S

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!