hi,please i need help in the thorough explanation of this program, madlip.py

"""String Substitution for a Mad Lib Adapted from code by Kirby Urner"""

storyFormat = """                                       
Once upon a time, deep in an ancient jungle,
there lived a {animal}.  This {animal}
liked to eat {food}, but the jungle had
very little {food} to offer.  One day, an
explorer found the {animal} and discovered
it liked {food}.  The explorer took the
{animal} back to {city}, where it could
eat as much {food} as it wanted.  However,
the {animal} became homesick, so the
explorer brought it back to the jungle,
leaving a large supply of {food}.

The End

def tellStory():                                     
    userPicks = dict()                              
    addPick('animal', userPicks)            
    addPick('food', userPicks)            
    addPick('city', userPicks)            
    story = storyFormat.format**(**userPicks)

def addPick(cue, dictionary):
    '''Prompt for a user response using the cue string,
    and place the cue-response pair in the dictionary.
    prompt = 'Enter an example for ' + cue + ': '
    response = input(prompt).strip() # 3.2 Windows bug fix
    dictionary[cue] = response                                                             

input("Press Enter to end the program.")        
2 Years
Discussion Span
Last Post by slate

First of all the program won't run.
Line 27,28 have syntax errors.

Secondly, if I fix that errors, then the explanation follows:
* There is a story, that has 3 parameters. Food, animal and city.
* The program asks the user on the command prompt for an example of the story's three parameters.
* Then the program substitutes the parameters the user has given into the story, and prints it out to the command prompt.

Is that, what you wanted? Or some "please do something to make me understand this, without having to do something" thing?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.