Question: Extend your guessing game from last week. Write a program that picks a random number from 1 - 1 0 0 . Then ask the

Extend your guessing game from last week. Write a program that picks a random number from 1-100. Then ask the user to guess a number. Tell the user if the answer is higher or lower than the number they guessed, or if they got the correct answer. Allow them to guess again if they got the guess incorrect. They should be able to guess numbers an infinite number of times until they get the correct answer, at which point your loop will end.
To generate a number from 1-100 you will need the following code at the beginning of your program:

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!