forked from tdwojak/Python2017
Praca domowa nr 2
Rozwiązanie - Piotr Bystrzycki - nr indeksu 45146
This commit is contained in:
parent
6c2b8ac2f9
commit
3c8fb8cd60
13
labs03/task01.py
Normal file
13
labs03/task01.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
def Fibogen(n):
|
||||||
|
if n == 0:
|
||||||
|
ret = yield 1
|
||||||
|
if n == 1:
|
||||||
|
ret = yield 1
|
||||||
|
for i in range(n+1):
|
||||||
|
ret = yield (Fibogen(n-2) + Fibogen(n-1))
|
||||||
|
return ret
|
||||||
|
|
||||||
|
for i in Fibogen(4):
|
||||||
|
print(i)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user