def dayUP(df): dayup=1.0 for i in range(365): if i % 7 not in [6,5,0]: dayup=dayup*(1+df) return dayupdayfactor=0.001a=0while dayfactor<=0.010: a=dayUP(dayfactor) dayfactor +=0.001 print("年终值是:{:.3f}.".format(a))
本文共 296 字,大约阅读时间需要 1 分钟。
def dayUP(df): dayup=1.0 for i in range(365): if i % 7 not in [6,5,0]: dayup=dayup*(1+df) return dayupdayfactor=0.001a=0while dayfactor<=0.010: a=dayUP(dayfactor) dayfactor +=0.001 print("年终值是:{:.3f}.".format(a))
转载于:https://www.cnblogs.com/zsny/p/8719154.html