Question
PYTHON: For this project, create a missing word guessing game that includes two functions: the Menu function and the MakeLimerick function. Menu Function Create a
PYTHON:
For this project, create a missing word guessing game that includes two functions: the Menu function and the MakeLimerick function.
Menu Function
Create a function called menu that has a loop. Inside the loop, display these choices:
Play
Cheat
Exit
If the user selects Play, call the function GuessLimerick (see below).
If the user selects Cheat, display the entire limerick without any missing words
If the user selects Exit, the loop should end. This should be the only way out of the loop.
GuessLimerick() Function
Create a function called GuessLimerick(). This function will be based on the podcast on NPR called "Wait, Wait, Don't Tell Me". In the podcast, there is a regular segment where a caller is asked to guess the last word of a limerick. For example, here is a limerick from this podcast on Oct 26, 2019:
In pizza tech, changes abound. The progress they serve is profound. I'd say it's a miracle to make the box spherical, a box that is totally...
(The missing word is round)
The makeLimerick function will display a limerick that is missing the last word and ask the user to provide it. If the user provides the correct word, the function will display "Congratulations!" and then display the entire limerick. If the user does not provide the correct word, the function should give the user up to 5 total chances to guess. If the user does not guess the correct word by the fifth try, display something like "Game over".
Requirements:
Program Output (1 point)
Include the output of the program as a multi-line comment at the bottom of the .py file or upload separately.
Main Program (1 point)
Call the menu function
Menu() Function (5 points):
a menu of options (Play, Cheat, Exit) must be enclosed in user-controlled loop
If the user selects Play, call the function GuessLimerick(). If the user selects Cheat, display the entire limerick without any missing words. If the user selects Exit, the loop should end.
GuessLimerick() Function (8 points):
Display a limerick that is missing the last word.
Give the user instructions to enter the missing word in all lower case letters.
Create a loop that will end when the user provides the missing word or after 5 attempts, whichever is first.
If the user provides the correct missing word to complete the limerick, stop the loop and display something like "Congratulations!", then display the entire limerick.
If the user provides a word that is not correct, display something like "Please try again" and continue the loop up to 5 total guesses. If the user does not guess the correct word by the fifth try, display something like "Game over".
PreviousNext
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