Question: i need this in Python. out put should be like second pic Requirements: The program will ask the user for an upper bound for the

Requirements: The program will ask the user for an upper bound for the game. The program will generate a random integer between 1 and that number. You will need to include the following two lines of code to create the random number: import random rand_num = random.randint (1, max_value) o where max_value is the upper bound chosen by the user. o rand_num will then be the random integer (between 1 and that upper bound) that the user needs to guess. Your program will then let the user guess the value of rand_num and tell them whether their guess is correct, too high, or too low. If their guess is not correct, it will then prompt them to guess again. This will continue until the user guesses the number correctly (you MUST use a loop for this). The program must also keep track of the number of guesses the user makes. o It should tell the user the number of their current guess (e.g. Guess Number 4: ____) o It will also tell the user at the end how many guesses they needed to find the answer. For simplicity, make all numbers integers (no fractions / decimals). Let's Play a Guessing Game! You'll start by entering a maximum value for the game. The value must be a positive integer. This program will randomly select a number between 1 and the number you entered. It will then be your turn to guess what that number is. Enter the maximum value here: 400 Make your first guess: 200 Too low try again! Guess #2: 300 Too low - try again! Guess #3: 350 Too high try again! Guess #4: 325 Too high - try again! Guess #5: 312 Too low - try again! Guess #6: 318 Too low - try again! Guess #7: 323 Congratulations! You've found the answer in 7 guesses
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
