34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# MAD LIBS — Fox
|
|
#
|
|
# The story is at the bottom. It is already written.
|
|
# The story needs words. Each word goes in a box (a variable).
|
|
#
|
|
# 3 boxes are done for you. 2 are not.
|
|
# Find the ____ lines and finish them. Copy the ones that are done.
|
|
# If you see NameError: name '____' you missed a blank.
|
|
#
|
|
# Run it with the play button ▶ (top right).
|
|
|
|
|
|
name = input("Type a name: ")
|
|
animal = input("Type an animal: ")
|
|
food = input("Type a food: ")
|
|
|
|
place = input ("type a place") # Ask for a place. Copy a line above and change it.
|
|
silly_word = input("type 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 one more line to the story. Use one of your boxes in it.
|
|
# BONUS 2: Make a new box called color. Use it in the story.
|