functions and branching def table( )print( ' ={ }-ln( - )={-log( - )}'for in [ ]valueerror (xnprint( ' ={ : dapprox{value: }error{error: }'table( = -ln( - )= approx error approx error approx error approx error this function does not need to return anythingsince entire purpose is to print information to the screen default arguments and doc strings when we used the range-function in the previous we saw that we could vary the number of arguments in the function call from one to threeand the non-specified arguments would be assigned default values we can achieve the same functionality in our own functionsby defining default arguments in the function definitiondef somefunc(arg arg kwarg =truekwarg = )print(arg arg kwarg kwarg function defined in this way can be called with twothreeor four arguments the first two have no default value and must therefore be included in the callwhile the last two are optional and will be set to the default value if not specified in the call in texts on python programmingdefault arguments are often referred to as keyword argumentsalthough these terms do not mean exactly the same thing they arehoweverclosely relatedwhich is why the terms are sometimes used interchangeably just as we cannot have keyword arguments preceding positional arguments in function callwe cannot have default arguments preceding non-default arguments in the function header the following code demonstrates uses of the alternative function calls for useless but illustrative function testing simple function such as the followingwhich does nothing but print out the argument valuesis good way to understand the implications of default arguments and the resulting flexibility in argument listsdef somefunc(arg arg kwarg =truekwarg = )print(arg arg kwarg kwarg somefunc('hello'[ , ]drop kwarg and kwarg