diff --git a/labs03/task03.py b/labs03/task03.py new file mode 100644 index 0000000..8065acc --- /dev/null +++ b/labs03/task03.py @@ -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) + +