> For the complete documentation index, see [llms.txt](https://programming.reedcwilson.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://programming.reedcwilson.com/lesson-2/mad-libs.md).

# Mad Libs

Hopefully you have tried a few mad-libs in your time. If you haven't, the idea is to fill in the blanks to a short story with the appropriate language parts (e.g. verb, noun, etc). When you are finished it is often a funny story. You will be implementing the part that randomly retrieves language parts for the main mad libs program.

{% embed url="<https://youtu.be/Srsa-ubR1MQ>" %}

## Setup

Fork the following repository and clone your copy (if you haven't already for this lesson).

[***Mad Libs***](https://github.com/pg-programming/mad-libs)

Open `languageparts.py` in your text editor.

For this assignment you are not writing the main program but are writing a module that the main program will use. Run the program using:

```bash
python mad-libs.py
```

## Requirements

### Imports

* use the `random` module to randomly select items from lists

### Dictionaries and Lists

* create a dictionary with at least the following language parts: noun, verb,

  adjective. Each language part will have a list of words that match that type.

  You may add more language parts but you must have the minimum set listed

  above.
* make sure the given language part is in the dictionary before trying to get

  the parts.
* randomly select an item from the list associated with the given language part.
