top of page

Mad Libs Project

This project was about creating a mad libs game!

Mad Libs Project

This was my first project in my Intro to Computer Science course, where we were tasked with creating a Mad Libs story generator. The project required us to build a program that prompts users to input specific types of words—like nouns, verbs, adjectives, and more—into designated fields. These user inputs are then used to replace the blanks in a story template, creating a personalized and often humorous narrative.


The original story was this:


Once upon a time, there was a conflict between two people. These two people were Jack and Joe. They were talking, loudly, about what the best food was. Jack says the best food is pizza, but Joe disagrees. They decided to go to the grocery store and check the prices to see if the pizza costs more than $5.00. They went to the grocery store to check the prices. Furthermore, they looked at the price, which was much more expensive than the other items. Jack was furious when he heard about the news.

Above is the story customizer. You can show the original story, generate your own story using your inputs, and clear everything.


Here is what the story would look like once you input everything!



For added customization, I’ve included a few extra settings. You can choose where your story will be displayed—either in the main area or within an alert box. Additionally, you can adjust the font size and select a different font family to suit your style. There’s also an advanced option to override the required fields, but be cautious with this one. It’s potentially risky as it allows the program to bypass checks for empty text boxes, which may lead to unexpected or incomplete stories being displayed.

bottom of page