functions def addtwo(ab)added return added addtwo( print(xcodewhen this script executesthe print statement will print out " because the addtwo function was called with and as arguments within the functionthe parameters and were and respectively the function computed the sum of the two numbers and placed it in the local function variable named added then it used the return statement to send the computed value back to the calling code as the function resultwhich was assigned to the variable and printed out why functionsit 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 readunderstandand 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 throughout the rest of the bookoften we will use function definition to explain concept part of the skill of creating and using functions is to have function properly capture an idea such as "find the smallest value in list of valueslater we will show you code that finds the smallest in list of values and we will present it to you as function named min which takes list of values as its argument and returns the smallest value in the list debugging if you are using text editor to write your scriptsyou might run into problems with spaces and tabs the best way to avoid these problems is to use spaces exclusively (no tabsmost text editors that know about python do this by defaultbut some don' tabs and spaces are usually invisiblewhich makes them hard to debugso try to find an editor that manages indentation for you