2.17 LAB Input Mad Lib

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

2.

17 LAB: Input: Mad Lib


Mad Libs are activities that have a person provide various words, which are then used to
complete a short story in unexpected (and hopefully funny) ways.
Complete the program to read the needed values from input, that the existing output statement(s)
can use to output a short story.
Ex: If the input is:
Eric
Chipotle
12
cars
Then the output is:
Eric went to Chipotle to buy 12 different types of cars
LAB ACTIVITY
2.17.1: LAB: Input: Mad Lib
10 / 10

first_name = input()

generic_location = input()

whole_number = input()

plural_noun = input()

print(first_name, 'went to', generic_location, 'to buy', whole_number, 'different types of', plural_noun)

You might also like