Lesson 3 Activity: Madlibs

Time for our next activity, madlibs! What's a madlib? Great question. A madlib is a funny script made of different words that are determined by a player. You put the words together, and because of the different inputs, something interesting is made! Here's an example below:


import time

adj1 = input("Enter an adjective: ")
col1 = input("Enter a color: ")
emo1 = input("Enter an emotion: ")
noun1 = input("Enter the name of a tool: ")
pla1 = input("Enter a place: ")

print("Once upon a time, there was a(n)", adj1, "boy named Jack.");
time.sleep(5)
print("He loved", col1, "flowers. But the hardest thing about these flowers was...")
time.sleep(8)
print("when the summer caused pollen to shoot up in the air. It made Jack sneeze quite a bit!")
time.sleep(6)
print("The flowers made Jack", emo1, " but they were located really far away!")
time.sleep(4)
print("The only way to get to them was to use a(n)", noun1, "to climb 7 mountains to reach...")
time.sleep(3)
print("the", pla1, "!! The End")



Feel free to use what we learned from previous lessons like time.sleep() and variables. Now it's your turn to come up with your own in replit and give it a go!