1
0
forked from tdwojak/Python2017
Python2017/labs03/task02.py
2017-12-02 15:42:37 +01:00

16 lines
264 B
Python

def Fibonacci(x):
for i in range(x):
if i==0 or i == 1:
a = 1
b = 1
yield 1
else:
temp = a
a += b
b = temp
yield a
nr = 5
for c in Fibonacci(nr):
print(c)