divider

Objective

Build a console-based mad lib game.

A mad lib is a word game where players fill in blanks with random words—like nouns, verbs, or places—to complete a silly story. The result is often weird, funny, and totally unexpected. Try one here to see how it works.

Skills to Practice

  • icon Ask the user for input
  • icon Store input in a variable
  • icon Use variables to format and display output
divider

Tasks

  • icon Create a new project named madlib-lastname. Don't forget the file extension (e.g. .js, .py, etc.).
  • icon Complete the following tasks:
    • icon Print a story title at the start of your program.
    • icon Ask the user to enter at least 5 words (e.g., noun, verb, adjective).
    • icon Insert those words into a pre-written story template.
    • icon Print the completed story in a fun, readable format.
divider

Sample Output

Sample Output
--- The Wonderful Journey ---
Enter a noun: Nintendo Entertainment System [Enter]
Enter an adjective: smelly [Enter]
Enter a verb: jump [Enter]
Enter another noun: hot dog [Enter]
Enter an adverb: suspiciously [Enter]
Here is your story:
Once upon a time, a smelly Nintendo Entertainment System decided to jump.
On its journey, it found a mysterious hot dog.
The Nintendo Entertainment System and the hot dog became friends.
Together, they jumped suspiciously into the sunset and lived happily ever
after.

Begin Challenge