Question
Write a Python program that generates a random number between 1 and 100, inclusive. This number will act as the target number. After generating this
Write a Python program that generates a random number between 1 and 100, inclusive. This number will act as the target number. After generating this number, your program should print out a prompt, asking the user to guess the number. After storing their guess taken from standard input, your program should then compare their guess to the target number. If the user guesses correctly, inform them that they guessed correctly and exit the program. Otherwise, tell the user whether their guess was higher or lower than the target and prompt them to enter another guess. Continue comparing the users guesses to the target number, giving them a hint, and asking for them to guess again until they correctly guess the number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started