Question: Write a program to perform the following functionality. NOTE: Use the sample screen shot at the end of this document to correctly format prompts
Write a program to perform the following functionality. NOTE: Use the sample screen shot at the end of this document to correctly format prompts and messages. Part 1 Call a function to display the heading. Part 2 Write the following loop: Prompt the user for a limit. Call a function to play the game which will: o Calculate a random number using the limit entered by the user. Display a message showing the range to be guessed. Write a loop that will: Prompt the user for a number. Compare the user guess to the generated random number. If the guess is too high, display message and retry. If the guess is too low, display message and retry. If the guess is correct, display message and exit loop. O o o Prompt the user to play again. If y, replay the game. If n, terminate the program.
Step by Step Solution
There are 3 Steps involved in it
Heres a Python program that performs the specified functionality for a number guessing gameimpo... View full answer
Get step-by-step solutions from verified subject matter experts
