CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
jackfrued

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: jackfrued/Python-100-Days
Path: blob/master/Day01-15/code/Day05/fibonacci.py
Views: 729
1
"""
2
输出斐波那契数列的前20个数
3
1 1 2 3 5 8 13 21 ...
4
5
Version: 0.1
6
Author: 骆昊
7
Date: 2018-03-02
8
"""
9
10
a = 0
11
b = 1
12
for _ in range(20):
13
a, b = b, a + b
14
print(a, end=' ')
15
16