There are only two kinds of programming languages:those people always bitch about and those nobody uses.
Bjarne Stroustrup
基本数据类型
天天向上
def dayUP(df):
dayup = 1.0
for i in range(365):
if i%7 in [6,0]:
dayup =dayup*(1-0.01)
else:
dayup = dayup*(1+df)
return dayup
dayfactor = 0.01
while(dayUP(dayfactor)<37.78):
dayfactor += 0.001
print("每天努力参数是:{:.3f}.".format(dayfactor))
每天努力参数是:0.019.