python 实现斐波那契数列

# 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)

猜你喜欢

转载自www.cnblogs.com/bluesl/p/9079705.html