1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-12-11 17:03:33 +01:00
parent a0d2623f9f
commit b353aee815

15
labs03/task02.py Normal file
View File

@ -0,0 +1,15 @@
#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))