1
0
forked from tdwojak/Python2017

Praca domowa nr 2

Rozwiązanie - Piotr Bystrzycki - nr indeksu 45146
This commit is contained in:
s45146 2017-12-03 13:12:25 +01:00
parent 6c2b8ac2f9
commit 3c8fb8cd60

13
labs03/task01.py Normal file
View 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)