some simple numerical programs nowlet' insert some errors and see what happens firsttry commenting out the statement ans the python interpreter prints the error messagenameerrorname 'ansis not definedbecause the interpreter attempts to find the value to which ans is bound before it has been bound to anything nowrestore the initialization of ansreplace the statement ans ans by ans ansand try finding the cube root of after you get tired of waitingenter "control (hold down the control key and the key simultaneouslythis will return you to the user prompt in the shell nowadd the statement print 'value of the decrementing function abs(xans** is',abs(xans** at the start of the loopand try running it again (the at the end of the first line of the print statement is used to indicate that the statement continues on the next line this time it will print value of the decrementing function abs(xans** is over and over again the program would have run forever because the loop body is no longer reducing the distance between ans** and abs(xwhen confronted with program that seems not to be terminatingexperienced programmers often insert print statementssuch as the one hereto test whether the decrementing function is indeed being decremented the algorithmic technique used in this program is variant of guess and check called exhaustive enumeration we enumerate all possibilities until we get to the right answer or exhaust the space of possibilities at first blushthis may seem like an incredibly stupid way to solve problem surprisinglyhoweverexhaustive enumeration algorithms are often the most practical way to solve problem they are typically easy to implement and easy to understand andin many casesthey run fast enough for all practical purposes make sure to remove or comment out the print statement that you inserted and reinsert the ans ans statementand then try finding the cube root of the program will seem to finish almost instantaneously nowtry as you can seeeven if millions of guesses are requiredit' not usually problem modern computers are amazingly fast it takes on the order of one nanosecond--one billionth of second--to execute an instruction it' bit hard to appreciate how fast that is for perspectiveit takes slightly more than nanosecond for light to travel single foot ( metersanother way to think about this is that in the time it takes for the sound of your voice to travel hundred feeta modern computer can execute millions of instructions