forked from tdwojak/Python2017
17 lines
219 B
Python
17 lines
219 B
Python
def Fib(n):
|
|
i=n+2
|
|
if (n==0):
|
|
yield 1
|
|
if (n==1):
|
|
yield 1
|
|
else:
|
|
for i in range(n):
|
|
yield i
|
|
|
|
|
|
for c in Fib(5):
|
|
print(c)
|
|
|
|
##(``F(0)=1, F(1)=1, FN=F(N-1) + F(N-2)``).
|
|
|