All pastes #1579446 Raw Edit

fibonaccipyton

public python v1 · immutable
#1579446 ·published 2009-09-25 19:13 UTC
rendered paste body
__author__="Odd"__date__ ="$23.sep.2009 14:06:59$"def fib(n):    if n <= 1:        return 1    else:        return fib(n - 1) + fib(n - 2)def startFib(n):    import time        for i in range(0, n):        t1 = time.time()        res = fib(i)        t2 = time.time()        #print("Resultat for fibnr " + str(i) + ": " + str(res) + " Tid: " + str(t2-t1))        print(str(t2-t1))