python/madlibs_owl.py
2026-09-24 09:56:23 -05:00

44 lines
1.1 KiB
Python

# MAD LIBS — Owl
#
# The story is at the bottom. It is already written.
# It needs 5 boxes (variables). You make them.
#
# Here is how one box is made:
#
# name = input("Type a name: ")
#
# Run it with the play button ▶ (top right).
# 1. Make a box called name. Ask for a name.
name = input("Type a name: ")
# 2. Make a box called animal. Ask for an animal.
# 3. Make a box called food. Ask for a food.
# 4. Make a box called place. Ask for a place.
# 5. Make a box called silly_word. Ask for a silly word.
# ----- THE STORY -----
# The f means: fill in the boxes.
# {animal} means: open the box called animal and put its word here.
print()
print(f"One day, {name} found a giant {animal} in the {place}.")
print(f"The {animal} was eating {food}.")
print(f"It looked up and yelled, \"{silly_word}!\"")
print(f"So {name} shared the {food}, and they became best friends.")
print("THE END")
# BONUS 1: Add two more lines to the story. Use your boxes.
# BONUS 2: Ask for a number, like this:
# number = int(input("Type a number: "))
# Then use {number * 2} in the story. What happens?