Today's files from your teacher
This commit is contained in:
parent
da123abb9b
commit
48fa8da373
6 changed files with 182 additions and 0 deletions
44
madlibs_owl.py
Normal file
44
madlibs_owl.py
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# 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?
|
||||
Loading…
Add table
Add a link
Reference in a new issue