def fib( )"""assumes an int > returns fibonacci of ""if = or = return elsereturn fib( - fib( - def testfib( )for in range( + )print 'fib of' '='fib(ifigure recursive implementation of fibonacci sequence writing the code is the easy part of solving this problem once we went from the vague statement of problem about bunnies to set of recursive equationsthe code almost wrote itself finding some kind of abstract way to express solution to the problem at hand is very often the hardest step in building useful program we will talk much more about this later in the book as you might guessthis is not perfect model for the growth of rabbit populations in the wild in thomas austinan australian farmerimported twenty-four rabbits from englandto be used as targets in hunts ten years laterapproximately two million rabbits were shot or trapped each year in australiawith no noticeable impact on the population that' lot of rabbitsbut not anywhere close to the th fibonacci number though the fibonacci sequence does not actually provide perfect model of the growth of rabbit populationsit does have many interesting mathematical properties fibonacci numbers are also quite common in nature finger exercisewhen the implementation of fib in figure is used to compute fib( )how many times does it compute the value fib( ) the damage done by the descendants of those twenty-four cute bunnies has been estimated to be $ million per yearand they are in the process of eating many native plants into extinction that we call this fibonacci sequence is an example of eurocentric interpretation of history fibonacci' great contribution to european mathematics was his book liber abaciwhich introduced to european mathematicians many concepts already well known to indian and arabic scholars these concepts included hindu-arabic numerals and the decimal system what we today call the fibonacci sequence was taken from the work of the sanskrit mathematician pingala if you are feeling especially geekytry writing fibonacci poem this is form of poetry in which the number of syllables in each line is equal to the total number of syllables in the previous two lines think of the first line (which has zero syllablesas place to take deep breath before starting to read your poem