it may not be clear why it is worth the trouble to divide program into functions there are several reasonscreating new function gives you an opportunity to name group of statementswhich makes your program easier to read and debug functions can make program smaller by eliminating repetitive code laterif you make changeyou only have to make it in one place dividing long program into functions allows you to debug the parts one at time and then assemble them into working whole well-designed functions are often useful for many programs once you write and debug oneyou can reuse it importing with fromreturn valuesincremental development importing with frompython provides two ways to import moduleswe have already seen oneimport math print math print math pi if you import mathyou get module object named math the module object contains constants like pi and functions like sin and exp but if you try to access pi directlyyou get an error print pi traceback (most recent call last)file ""line in nameerrorname 'piis not defined as an alternativeyou can import an object from module like thisfrom math import pi now you can access pi directlywithout dot notation print pi or you can use the star operator to import everything from the modulefrom math import