Skip to main content

C'est la Z

Madlib Madness

Earlier in the term, our intro classes spent a little time learning some basic HTML. We don’t spend a lot of time on it, just enough so that the students can present their work in a static web site. The end goal, though, was to programatically generate the web sites - there’s nothing quite as empowering to a student as when they can present their work to the world.

Finally, it’s all coming together.

Now that the classes are comfortable with Python, we can have some fun. We all remember Mad Libs - that wacky word game where you select unknowingly select words to substitute into a basic story and hilarity ensues.

We did our own versions using Python files, lists and dictionaries.

Here are some of the results: 2. 3. 4. 5.

The students wrote a basic story with substitution points. Their programs then randomly replaced these points with words from an assortment of categorized lists.


comments powered by Disqus