"STORY" is not defined


name = raw_input("enter a name:")

adjective = raw_input ("enter a adjective:")

adjective_a = raw_input("enter a adjective:")

adjective_b = raw_input("enter a adjective:")

verb = raw_input("enter a verb:")

verb_a = raw_input("enter a verb:")

verb_b = raw_input("enter a verb:")

noun = raw_input("enter a noun:")

noun_a = raw_input("enter a noun:")

noun_b = raw_input("enter a noun:")

noun_c = raw_input("enter a noun:")

animal = raw_input("animal:")

food = raw_input("food:")

fruit = raw_input("fruit:")

number = raw_input("number:")

superheroname = raw_input("super hero:")

country = raw_input("country:")

dessert = raw_input("a dessert:")

year = raw_input("a year:")

print STORY % (adjective, name, verb, adjective_a, noun, noun_a, animal, food, verb_a, noun_b, fruit, adjective_b, name, verb_b, number, name, superheroname, superheroname, name, country, name, dessert, name, year, noun_c)

#The template for the story
STORY = "This morning I woke up and felt %s because %s was going to finally %s over the big %s %s. On the other side of the %s were many %s protesting to keep %s in stores. The crowd began to %s to the rythym of the %s , which made all of the %s very %s . %s tried to %s into the sewers and found %s rats. Needing help, %s quickly called %s . %s appeared and saved %s by flying to %s and dropping %s into a puddle of %s . %s then fell asleep and woke up in the year %s , in a world where %s ruled the world."


well you already try to print story:

print STORY % // rest of the code

before you declared the story variable:

STORY = "This morning I woke up and felt %s because %s was goin // rest of the code

try to place the print after the declaration of STORY


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