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