1
0
forked from tdwojak/Python2017
Python2017/labs03/task02.py
2017-12-11 17:03:33 +01:00

15 lines
248 B
Python

#task02
#Fibonacci
def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-2) + fibonacci(n-1)
print(fibonacci(0))
print(fibonacci(1))
print(fibonacci(2))
print(fibonacci(3))
print(fibonacci(4))
print(fibonacci(20))