Today's files from your teacher
This commit is contained in:
parent
6c2871e27a
commit
20b12c8025
6 changed files with 182 additions and 0 deletions
30
madlibs_bear.py
Normal file
30
madlibs_bear.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# MAD LIBS — Bear
|
||||
#
|
||||
# You write the questions AND the story.
|
||||
#
|
||||
# A box (variable) is made like this:
|
||||
# name = input("Type a name: ")
|
||||
#
|
||||
# A story line uses boxes like this:
|
||||
# print(f"One day, {name} went to the store.")
|
||||
#
|
||||
# Run it with the play button ▶ (top right).
|
||||
|
||||
|
||||
# 1. Make at least 5 boxes. Ask for things like an animal, a food,
|
||||
# a place, a silly word, a number.
|
||||
|
||||
|
||||
|
||||
# 2. Write your story. At least 4 lines. Use every box at least once.
|
||||
# Use one box two times.
|
||||
|
||||
print()
|
||||
|
||||
|
||||
print("THE END")
|
||||
|
||||
|
||||
# BONUS 1: Ask for a number with int(input(...)).
|
||||
# Do some maths with it inside the story, like {number * 100}.
|
||||
# BONUS 2: Make the story ask a question in the middle, then keep going.
|
||||
Loading…
Add table
Add a link
Reference in a new issue