specifications figure defines functionfindrootthat generalizes the bisection search we used to find square roots in figure it also contains functiontestfindrootthat can be used to test whether or not findroot works as intended the function testfindroot is almost as long as findroot itself to inexperienced programmerswriting test functions such as this often seems to be waste of effort experienced programmers knowhoweverthat an investment in writing testing code often pays big dividends it certainly beats typing test cases into the shell over and over again during debugging (the process of finding out why program does not workand then fixing itit also forces us to think about which tests are likely to be most illuminating the text between the triple quotation marks is called docstring in python by conventionpython programmers use docstrings to provide specifications of functions these docstrings can be accessed using the built-in function help if we enter the shell and type help(abs)the system will display help on built-in function abs in module __builtin__absabs(number-number return the absolute value of the argument if the code in figure (belowhas been loaded into idletyping help(findrootin the shell will display help on function findroot in module __main__findroot(xpowerepsilonassumes and epsilon int or floatpower an intepsilon power > returns float such that **power is within epsilon of if such float does not existit returns none if we type findrootin either the shell or the editorthe list of formal parameters and the first line of the docstring will be displayed