rq/examples/fib.py

6 lines
104 B
Python
Raw Normal View History

2011-11-14 14:15:05 +00:00
def slow_fib(n):
if n <= 1:
return 1
else:
return slow_fib(n-1) + slow_fib(n-2)