Question: For this assignment, you will be a making a guessing game with a twist. IN PYTHON You will play the role of the computer, and

For this assignment, you will be a making a guessing game with a twist. IN PYTHON You will play the role of the computer, and the computer will try to guess the number. You will think of a number (you dont have to read it in as input) between 1 and 100. You will create a loop that runs 5 times. In this loop, the computer will try to guess the number in the range it knows is valid (to start, the range will be 1-100) and will print out the guess on the screen. Next, it will ask you if you its guess is correct. You will respond with High,Low, or Correct. If it is not correct, the computer will adjust its range and loop around to guess again. If it is correct, the computer will print out a happy message and exit. If the computer has not guessed correctly after 5 tries, it will print out a sad message and exit.
Sample Output (User-Typed Information Is Bolded/Underlined):
Time to play Guessing Game!
I think the number is 27.
Howd I do? Low
I think the number is 92.
Howd I do? High
I think the number is 58.
Howd I do? Correct
Yes! I won!

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 Programming Questions!