name userpicks with new empty dictionary created by the python code dict( - addpick is the name for function defined by the sequence of instructions on lines - used to add another definition to dictionarybased on the user' input the result of these three lines is to add definitions for each of the three words animalfoodand city to the dictionary called userpicks assign the name story to string formed by substituting into storyformat using definitions from the dictionary userpicksto give the user' customized story this is where all the work becomes visibleprint the story string to the screen def addpick(cuedictionary) '''prompt for user response using the cue string and place the cue-response pair in the dictionary '' prompt 'enter an example for cue ' response input(prompt dictionary[cueresponse this line is the heading of definitionwhich gives the name addpick as short way to refer to the sequence of statements indented on line - the name addpick is followed by two words in parenthesiscue and dictionary these two words are associated with an actual cue word and dictionary given when this definition is invoked in lines - - documentation comment for the addpick definition the plus sign here is used to concatenate parts of the string assigned to the name prompt the current value of cue is placed into the string the right-hand-side of this equal sign causes an interaction with the userto input text from the keyboardthe prompt string is printed to the computer screenand the computer waits for the user to enter line of text that line of text then becomes string inside the program this string is assigned to the name response the left-hand-side of the equal sign is reference to the definition of the cue word in the dictionary the whole line ends up making the definition of the current cue word become the response typed by the user tellstory(input('press enter to end the program ' the definition of tellstory above does not make the computer do anything besides remember what the instruction tellstory means it is only in this linewith the nametellstoryfollowed by parenthesesthat the whole sequence of remembered instructions are actually carried out this line is only here to accommodate running the program in windows by double clicking on its file icon without this linethe story would be displayed and then the program would endand windows would make it immediately disappear from the screenthis line forces the program to continue being displayed until there is another response from the userand meanwhile the user may look at the output from tellstory starting idle the program that translates python instructions and then executes them is the python interpreter this interpreter is embedded in number of larger programs that make it particularly easy to develop python programs such programming environment is idleand it is part of the standard distribution of python it is possible to open the idle app directlystart searchwindowspress the windows key or go to the start menu the python interpreter and idlepart