(bas the very first entry in the body of functionthis should describe[definition and use of dictionaries (page ) the return value of the function (if there is oneii anything about the parameters that is not totally obvious from the names iii anything about the results from the function that is not obvious from the name programming patterns (ainput-calculate-outputthis is the simplest overall program model first obtain all the data you need (for instance by prompting the user for keyboard inputcalculate what you need from this data output the data (for instance to the screen with print functions[the input function (page )(brepetitive patternsthese patterns are all associated with loops loops are essential if the number of repetitions depends on dynamic data in the program even if you could avoid loop by repeating codea loop is usually better choice to make the repetitive logic of your program clear to all exact repetition some number of timesif the number of time to repeat is nfor in rangen )actions to be repeated here the variable is included only because there must be variable name in for loop [simple repeat loop (page )ii for-each loopdo the same sort of thing for each item in specified sequence [basic for loops (page )for item in sequence actions to be done with each item the sequence can be rangewhere item is the next integer in the range iii successive modification looprepeat basic ideabut where the data involved each time changes via pattern that is coded in the loop to convert the previous data into the data needed the next time through the loop [successive modification loops (page )]initialize all variables that will be successively modified in the loop loop heading for the repetition actions to be in each loop with the current variable values modify the variable values to prepare for the next time through the loop iv accumulation loopa sequence of items need to be combined this works where the accumulation of all the items can be approached incrementallycombining one after another with the accumulation so far [accumulation loops (page )]initialize the accumulation to include none of the sequence for item in sequence summary