Mad Libs is a phrase template word game. One player prompts others for a list of words to substitute for blanks in a story, then reads the story aloud.
If you've never seen mad libs before, it's an interactive story generator. You can see and online example here.
In this project, you are going to write a Mad Libs game. The program should prompt the user for some words, and then fill in the blanks in the story with those words.
To write the program:
- Write a story of your own and keep it as strings in the program.
- Prompt the user for different words. For example: "Enter a funny word" and "Enter your last name"
- Store all the responses the user entered
- Complete the story by filling the blanks (originally left empty for user input)
- Print out the full story
- (Bonus) Play a computer voice that reads the story out loud.
You are allowed to work together if you like, but it's not mandatory.
Be creative, and have fun!
Use this to check that your work is complete
- The program runs without errors
- The program prompts the user for at least 5 words
- The program uses those words in a generated story
- You can use lots of print statements, instead of one big one
- Be mindful of your syntax! It's easy to miss a character.
- Be careful about the spaces in your strings. Python won't add extra space, so you need to add it in your code.
- Search for "text to speech python" to find some ready libraries that can play the audio for you
Here's a sample completed Mad Libs game.