# coding:utf8 __author__ = 'bluesli' def fun(arg1,arg2,stop): if arg1==0: print(arg1,arg2) arg3 = arg1+arg2 print(arg3) if arg3<stop: arg3 = fun(arg2,arg3,stop) fun(0,1,100)
python 实现斐波那契数列
最新推荐文章于 2024-04-12 09:56:01 发布
# coding:utf8 __author__ = 'bluesli' def fun(arg1,arg2,stop): if arg1==0: print(arg1,arg2) arg3 = arg1+arg2 print(arg3) if arg3<stop: arg3 = fun(arg2,arg3,stop) fun(0,1,100)