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 15:14:31 +01:00
parent 233a2250f6
commit c723ed6bb1

21
labs03/task03.py Normal file
View File

@ -0,0 +1,21 @@
def Fibogen(n):
if n == 0:
yield 1
if n == 1:
yield 1
yield 1
if n >= 2 :
i, j = 1, 1
yield 1
yield 1
for k in range(2, n):
f = i + j
i = j
j = f
yield f
for i in Fibogen(15):
print(i)