Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mustafamuratcoskun
GitHub Repository: mustafamuratcoskun/Sifirdan-Ileri-Seviyeye-Python-Programlama
Path: blob/master/Pythondaki Iteratorlar ve Generatorlar/Kodlama Egzersizleri/generator.py
765 views
1
def fibonacci():
2
3
a = 1
4
b = 1
5
yield a
6
yield b
7
8
while True:
9
10
a,b = b, a+b
11
12
yield b
13
14
for sayı in fibonacci():
15
16
if (sayı > 100000):
17
break
18
print(sayı)
19
20
21
22