1
0
forked from tdwojak/Python2017

task02 done

This commit is contained in:
s45147 2017-12-09 23:16:43 +01:00
parent b986a45879
commit 984bf73c46

14
labs03/task02.py Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
def fibonacci(n):
fn = [0, 1,]
for i in range(2, n):
fn.append(fn[i-1] + fn[i-2])
yield fn
a = fibonacci(10)
for i in a:
print(i)