so farwe have introduced numbersassignmentsinput/outputcomparisonsand looping constructs how powerful is this subset of pythonin theoretical senseit is as powerful as you will ever need such languages are called turing complete this means that if problem can be solved via computationit can be solved using only those statements you have already seen which isn' to say that you should use only these statements at this point we have covered lot of language mechanismsbut the code has been single sequence of instructionsall merged together for examplein the last we looked at the code in figure epsilon numguesses low high max( xans (high low)/ while abs(ans** >epsilonnumguesses + if ans** xlow ans elsehigh ans ans (high low)/ print 'numguesses ='numguesses print ans'is close to square root of' figure using bisection search to approximate square root this is reasonable piece of codebut it lacks general utility it works only for values denoted by the variables and epsilon this means that if we want to reuse itwe need to copy the codepossibly edit the variable namesand paste it where we want it because of this we cannot easily use this computation inside of some othermore complexcomputation furthermoreif we want to compute cube roots rather than square rootswe have to edit the code if we want program that computes both square and cube roots (or for that matter square roots in two different places)the program would contain multiple chunks of almost identical code this is very bad thing the more code program containsthe more chance there is for something to go wrongand the harder the code is to maintain imaginefor examplethat there was an error in the initial implementation of square rootand that the error came to light when testing the program it would be all too easy to fix the implementation of square root in one place and forget that there was similar code elsewhere that was also in need of repair python provides several linguistic features that make it relatively easy to generalize and reuse code the most important is the function