user input and error handling it would be convenient to make your own module that you can import into other programs when needed fortunatelythis task is very simple in pythonjust collect the functions you want in fileand you have new moduleto look at specific examplesay we want create module containing the interest formula considered earlier and few other useful formulas for computing with interest rates we have the mathematical formulas ( / ) - ( / na ln ( ln( /  / - ( ( ( whereas abovep is the initial amountr is the interest rate (percent) is the number of yearsand is the final amount we now want to implement these formulas as python functions and make module of them we write the functions in the usual wayfrom math import log as ln def present_amount(prn)return *( / )** def initial_amount(arn)return *( / )**(-ndef years(par)return ln( / )/ln( / def annual_rate(pan)return *(( / )**( / if we now save these functions in file interest pyit becomes module that we can importjust as we are used to with built-in python modules as an examplesay we want to know how long it takes to double our money with an interest rate of the years function in the module provides the right formulaand we can import and use it in our programas followsfrom interest import years years( *ppprint( 'money has doubled after {nyears'we can add test block to module file if we try to run the module file above with python interest py from the terminalno output is produced since the functions are never called sometimes it can be useful to be able to add some examples of use in module fileto demonstrate how the functions