Python Mad LIb


Hi, I can’t seem to figure out what I’m doing wrong. My code gives me an indentation error but I don’t understand it. Can someone help please?

 """ 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)


I’m also missing an adjective


% (adj1, name, verb1, adj2,

Where is your adj1?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.