test your knowledgeanswers functions are the most basic way of avoiding code redundancy in python--factoring code into functions means that we have only one copy of an operation' code to update in the future functions are also the basic unit of code reuse in python --wrapping code in functions makes it reusable toolcallable in variety of programs finallyfunctions allow us to divide complex system into manageable partseach of which may be developed individually function is created when python reaches and runs the def statementthis statement creates function object and assigns it the function' name this normally happens when the enclosing module file is imported by another module (recall that imports run the code in file from top to bottomincluding any defs)but it can also occur when def is typed interactively or nested in other statementssuch as ifs function returns the none object by default if the control flow falls off the end of the function body without running into return statement such functions are usually called with expression statementsas assigning their none results to variables is generally pointless return statement with no expression in it also returns none the function body (the code nested inside the function definition statementis run when the function is later called with call expression the body runs anew each time the function is called checking the types of objects passed into function effectively breaks the function' flexibilityconstraining the function to work on specific types only without such checksthe function would likely be able to process an entire range of object types--any objects that support the interface expected by the function will work (the term interface means the set of methods and expression operators the function' code runs function basics