-
-
Save codecademydev/106346133d7ad6200db8d382c24c7075 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" For this project, we'll provide you with the story (feel free to modify it), but it will be up to you to build a program that does the following: Prompt the user for input and print the entire mad lib """ | |
print "Mad Lib is Starting!" | |
name = raw_input("Enter a name: ") | |
adj2 = raw_input("Enter an adjective: ") | |
adj3 = raw_input("Enter an adjective: ") | |
verb1 = raw_input("Enter a verb: ") | |
verb2 = raw_input("Enter a verb: ") | |
verb3 = raw_input("Enter a verb: ") | |
noun1 = raw_input("Enter a noun: ") | |
noun2 = raw_input("Enter a noun: ") | |
noun3 = raw_input("Enter a noun: ") | |
noun4 = raw_input("Enter a noun: ") | |
animal = raw_input("Enter a animal: ") | |
food = raw_inptut("Enter a food: ") | |
fruit = raw_input("Enter a fruit: ") | |
number = raw_input("Enter a number: ") | |
hero = raw_input("Enter a super hero: ") | |
country = raw_input("Enter a country: ") | |
dessert = raw_input("Enter a dessert: ") | |
year = raw_input("Enter a year: ") | |
#The template for the story | |
STORY = "This morning I woke up and felt %s because _ was going to finally %s over the big _ %s. On the other side of the %s were many %ss protesting to keep %s in stores. The crowd began to _ to the rhythm of the %s, which made all of the %ss very _. %s tried to _ into the sewers and found %s rats. Needing help, %s quickly called %s. %s appeared and saved %s by flying to %s and dropping _ into a puddle of %s. %s then fell asleep and woke up in the year _, in a world where %ss ruled the world." % (adj1, name, verb1, adj2, noun1, animal, food, verb2, noun3, fruit, adj3, name, verb3, number, name, hero, name, dessert, name, year, noun4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some errors in the code. For example, you have not defined "adj1" in the code and line 20, "input" is spelt incorrectly.