Mad Libs error, value error: (,)

value error unsupported format character ’ ,’
Not sure why it does not work, after entering YEAR< it just errors out and will not show my STORY. Thanks for any help. Output below

This program generates passages that are generated in mad-lib format
Author: Katherin

The template for the story

STORY = “This morning %s woke up feeling %s. It is going to be a %s day!’ Outside, a bunch of %s were protesting to keep %s in stores. They began to %s to the rhythm of the %, which made all the %s very %. 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 %s ruled the world.”

print “Mad Libs has started”

name = raw_input("Enter a name: ")

adj1 = raw_input("Enter adjective one: ")

adj2 = raw_input("Enter adjective two: ")

adj3 = raw_input("Enter adjective three: ")

verb1 = raw_input("Enter Verb: ")

noun1 = raw_input("Enter First noun: ")

noun2 = raw_input("Enter second noun: ")

animal = raw_input("Enter an animal: ")

food = raw_input(" Enter a food: ")

fruit = raw_input("Enter a fruit: ")

superhero = raw_input("Enter a superhero: ")

country = raw_input("Enter a country: ")

dessert = raw_input("Enter a dessert: ")

year = raw_input("Enter a year: ")

print STORY % (name, adj1, adj2, animal, food, verb1, noun1, fruit, adj3, name, superhero, name, country, name, dessert, name, year, noun2)

cant seem to copy the output from bash… what am I missing to do that?


Hi @bit1807492701!

Could you please send us the link to the exercise?

Hello, @bit1807492701.

Look closely through this long string. You are using %s as a placeholder for string values. Your error message is telling you that , is not a supported format character. Do you see anywhere in your string where you have %,? How about additional unsupported format characters?

1 Like