Skip to content

Instantly share code, notes, and snippets.

@maxis1718
Forked from d2207197/count_ipython.log
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save maxis1718/943db1b1b1425320c91c to your computer and use it in GitHub Desktop.

Select an option

Save maxis1718/943db1b1b1425320c91c to your computer and use it in GitHub Desktop.

Revisions

  1. @d2207197 d2207197 created this gist Nov 6, 2014.
    5 changes: 5 additions & 0 deletions fibonacci.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@

    def fib(n, fibs=[1, 1]):
    if n >= len(fibs):
    fibs.append(fib(n - 2) + fib(n - 1))
    return fibs[n]