← Projects

fib

a70dec06598eb254bed5978980e977318a81823f · ovidiucs · May 10, 2015 20:45

+8 · 1 file changed

  • 02.Fibonacci.py +8 −0
diff --git a/02.Fibonacci.py b/02.Fibonacci.py
new file mode 100644
index 0000000..27a6a53
--- /dev/null
+++ b/02.Fibonacci.py
@@ -0,0 +1,8 @@
+__author__ = 'ovidiucs'
+
+def fibo(n):
+    if n < 2:
+        return n
+    return fibo(n - 1) + fibo(n - 2)
+
+print fibo(10)
\ No newline at end of file