标签:col 等于 table span sum color int pytho height
斐波纳契数列 |
斐波那契数列指的是这样一个数列 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368........
这个数列从第3项开始,每一项都等于前两项之和。
示例1:
1 def sum(arg1,arg2,stop): 2 arg3 = arg1 + arg2 3 print(arg3,) 4 if arg3 < 10: 5 sum(arg2,arg3,stop) 6 7 sum(0,1,10
输出:
1 2 3 5 8 13
示例2:
a,b = 0,1 while b < 10: print(b,) a,b = b,a+b
输出:
1 1 2 3 5 8
标签:col 等于 table span sum color int pytho height
原文地址:https://www.cnblogs.com/bangyongfeng/p/9228231.html