Answered step by step
Verified Expert Solution
Question
1 Approved Answer
On Python language Question 3: Write a guessing script like in the lab worksheet where you continually prompt a user to guess a number from
On Python language
Question 3: Write a guessing script like in the lab worksheet where you continually prompt a user to guess a number from 1 to 100 until they guess the number. After the second guess, and all subsequent guesses, the program should tell the user if they are getting hotter (meaning their current guess is closer than their previous guess) or getting colder (meaning their current guess is farther away than their previous guess). Here's an example, assuming the number to guess is 20: Please guess my number between 1 and 100 > Guess 1: 50 No sorry, that is not my number > Guess 2: 75 You are getting colder. No sorry, that is not my number. > Guess 3: 25 You are getting warmer. No sorry, that is not my number. > Guess 4: 30 No sorry, that is not my number. You are getting colder. > Guess 5: 20 You guessed my number! There is one caveat about the hotter" and "colder" hints you give the user. If the user's next guess is the same distance away from the right number as their previous guess, then technically they are not hotter or colder. In that case, we will make the decision to tell the user that they are getting hotterStep 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