Question: Create a Python program that randomly selects a number from 1 through 100 and asks the user to guess the number. At each guess the

Create a Python program that randomly selects a number from 1 through 100 and asks the user to guess the number. At each guess the user should be told if the guess is proper, and if so, whether it is too high or too low. The user should be told of the number of guesses when finally guessing the correct number.

Possible Outcome:

I've thought of a number from 1 through 100 Guess the number: 50 Too low Try again: 123 Number must be from 1 

I've thought of a number from 1 through 100 Guess the number: 50 Too low Try again: 123 Number must be from 1 through 100. Try again: sixty You did not enter a number. Try again: 60 Too high Try again: 56 Correct. You took 5 guesses.

Step by Step Solution

3.59 Rating (156 Votes )

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!