Mad Libs
Mad Libs
Coding Project
Mad Libs
Mad Libs are stories with certain words removed. One player acts as the “reader” and asks the other players,
who haven’t seen the story, to fill in the blanks with adjectives, nouns, colors, adjectives, and more. These
words are inserted into the blanks and then the story is read aloud to hilarious results.
Your mad libs program will ask for certain kinds of words in the story. The user will enter all the required
pieces of the story as a single line. Your program will then take apart that line, get the words it needs, and then
insert it into the mad libs story.
Here are some words you can ask for to make your story work:
You are going to create your own "Mad Lib" program that asks the user to input (minimum) 6 words, in the
format word, word, word, word, word, word
The user will enter in a single string of words, separated by a comma then a space. Place the answers in the
spots in the Mad Libs script that you create. Make sure to ask for the words out of order from the story, so the
user does not know what sort of story they are creating.
You can create your own story, or use the template below
It was a <adjective> day in AP Computer Science A, when <teacher> burst in the doorway. They started
singing <song> while <student> <verb-ed> with them. The whole class clapped as <student> did their signature
dance move: the <adverb> <verb>.
This template is used in the example run. The words in bold are what the user entered.