print ('The story begins with a single pair of newly born rabbits...')
print ('they are able to mate at the age of one month...')
print ('and to reproduce at the age of two...')
print ('and to do so every month...')

month, newborns, mating, pairsofrabbits = (1, 1, 0, 1)
while month < 13:
    pairsofrabbits = mating + newborns
    print ("month #{0}: newborns = {1} mating = {2} pairsofrabbits = {3}".format(month,newborns,mating,pairsofrabbits))
    month, newborns, mating = (month+1, mating, mating + newborns)

print ('In 12 months the first pair has generated {0} pairs of rabbits'.format(pairsofrabbits))

# program: Fibonacci's ideal rabbit generation
# implementation in Python 3.x: A.-P. Gaspar




Fibonacci’s ideal rabbit generation, in Python ?




YOUTUBE