functions and branching print( print(amount( )call a_list [amount(yearfor year in range( )#multiple calls the call amount(nfor some argument returns float objectwhich essentially means that amount(nis replaced by this float object we can therefore make the call amount(neverywhere float can be used note thatunlike many other programming languagespython does not require the type of function arguments to be specified judging from the function header onlythe argument of amount(nabove could be any kind of variable howeverby looking at how is used inside the functionwe can tell that it must be number (integer or floatif we write complex functions where the argument types are not obviouswe can insert comment immediately after the headera so-called doc stringto tell users what the arguments should be we will return to the topic of doc strings later in this function arguments and local variables just as in mathematicswe can define python functions with more than one argument the formula above involves both and in addition to nand including them all as arguments could be useful the function definition could then look like def amount(prn)return *( + / )** sample callsa amount( amount( = amount( = note that we are using the arguments prand inside the function exactly as in the previous examplewhere we defined and inside the function inside functionthere is no distinction between such local variables and the arguments passed to the function the arguments also become local variablesand are used in exactly the same way as any variable we define inside the function howeverthere is an important distinction between local and global variables variables defined in the main program become global variableswhereas variables defined inside functions are local the local variables are only defined and available inside functionwhereas global variables can be used everywhere in program if we tried to access pror ( by print( )from outside the functionwe will simply obtain an error message stating that the variable is not defined arguments can be positional arguments or keyword arguments notice also the alternative ways of calling function we can either specify the