tenance headaches--in the next we will see how to create custom modules with functionality that can be shared across any number of programs def get_integer(messagename="integer"default=noneminimum= maximum= allow_zero=true)this function is so similar in structure to the get_string(function that it would add nothing to reproduce it here (it is included in the source code that accompanies the bookof course the allow_zero parameter can be useful when is not valid value but where we want to permit one invalid value to signify that the user has cancelled another approach would be to pass an invalid default valueand if that is returnedtake it to mean that the user has cancelled the last statement in the program is simply call to main(overall the program is slightly more than lines and shows several features of the python language introduced in this and the previous ones summary ||this covered the complete syntax for all of python' control structures it also showed how to raise and catch exceptionsand how to create custom exception types most of the was devoted to custom functions we saw how to create functions and presented some rules of thumb for naming functions and their parameters we also saw how to provide documentation for functions python' versatile parameter syntax and argument passing were covered in detailincluding both fixed and variable numbers of positional and keyword argumentsand default values for arguments of both immutable and mutable data types we also briefly recapped sequence unpacking with and showed how to do mapping unpacking with *mapping unpacking is particularly useful when applied to dictionary (or other mapping)or to the mapping returned by locals()for passing key-value arguments to str format(format string that uses named fields if we need to assign new value to global variable inside functionwe can do so by declaring that the variable is globalthereby preventing python from creating local variable and assigning to that in generalthoughit is best to use global variables only for constants lambda functions are often used as key functionsor in other contexts where functions must be passed as parameters this showed how to create lambda functionsboth as anonymous functions and as means of creating small named one-line functions by assigning them to variable