Question: Write a Python program that generates a random number between 1 and 1 0 0 . The program prompts the user to guess the number.
Write a Python program that generates a random number between and The program
prompts the user to guess the number. If the guess is higher or lower than the random number,
the program provides feedback Too high, try again' or 'Too low, try again' If the guess is
correct, the program congratulates the user and displays the number of guesses made. The
program allows the user to quit the game at any time by entering the digit zero as a guess.
Example run:
Gues the number enter to quit:
Too high, try again.
Gues the number enter to quit:
Too high, try again.
Gues the number enter to quit:
Too high, try again.
Gues the number enter to quit:
Too low, try again.
Gues the number enter to quit:
Too low, try again.
Gues the number enter to quit:
Congratulations! You guessed the number correctly in guesses.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
