(hformatexpression formatstring if expression is numericthe format string can be in the form # 'where the gets replaced by nonnegative integerand the result is string with the value of the expression rounded to the specified number of digits beyond the decimal point [floatsdivisionmixed types (page ) functions defined by userdef functionname parameter parameter and so on consistently indented statement blockwhich may include return statement (athere may be any number of parameters the parentheses must be included even if there are no parameters [function parameters (page )(bwhen function is first definedit is only rememberedits lines are not executed [ first function definition (page )(cwhen the function is later called in other codethe actual parameters in the function call are used to initialize the local variables parameter parameter and so on in the same order as the actual parameters [function parameters (page )(dthe local variables of function are independent of the local names of any function defined outside of this function the local variables must be initialized before useand the names lose any association with their values when the function execution terminates [local scope (page )(eif return statement is reachedany further statements in the function are ignored [returned function values (page )(ffunctions should be used toi emphasize that the code corresponds to one idea and give an easily recognizable name [ first function definition (page )ii avoid repetition if basic idea is repeated with just the data changingit will be easier to follow and use if it is coded once as function with parametersthat gets called with the appropriate actual parameters when needed [function parameters (page )iii it is good to separate the internal processing of data from the input and output of data this typically means placing the processing of data and the return of the result in function [function parameters (page )iv separate responsibilitiesthe consumer of function only needs to know the nameparameter usageand meaning of any returned value only the writer of function needs to know the implementation of function [two roleswriter and consumer of functions (page ) modules (program files(aa module may start with documentation string [program documentation string (page )(bdefine your functions in your module if the module is intended as main program called only one waya convention is make your execution just be calling function called main [multiple function definitions (page )(cavoid defining variable outside of your functions names for constant (unchangingvalues are reasonable exception [global constants (page ) documentation stringa stringoften multi-line (triple quotedstring that may appear in two places(aat the very beginning of filethis should give overall introductory information about the file [program documentation string (page ) beginning with python