Https://www.codecademy.com/courses/learn-python/projects/madlibs


#1

Hello,

I am getting the following error:

Traceback (most recent call last):
File “Madlibs.py”, line 38, in
print STORY % (name, adj_one, adj_two, animal, food, verb, noun_one, fruit, adj_three, name, superhero, name, country, name, dessert, name, year, noun_two)
TypeError: not all arguments converted during s
tring formatting

What am I doing wrong?
STORY = “This morning %s woke up feeling %s. ‘It is going to be a _ day!’ Outside, a bunch of %ss were protesting to keep %s in stores. They began to %s to the rhythm of the %s, which made all the %ss very %s. Concerned, %s texted %s, who flew %s to %s and dropped %s in a puddle of frozen %s. %s woke up in the year %s, in a world where %ss ruled the world.”

print STORY % (name, adj_one, adj_two, animal, food, verb, noun_one, fruit, adj_three, name, superhero, name, country, name, dessert, name, year, noun_two)


#2

Hi @stutigor27,

The error message indicates to us that there are an insufficient number of %s formatters to convert all the expressions in STORY during output.

Count the number of %s formatters and compare it to the number of variables that you are attempting to output. Then examine STORY to find where you omitted a %s formatter.

'It is going to be a _ day!' might be a good place to consider a correction that would make your day a little better. :wink:


#3

Oh! That really made my day :slight_smile: !Thanks @appylpye