第三天:论每天努力1%的重要性
#DayDayUp
# 1‰的力量
dayup1 = pow(1.001,365)
daydown1 = pow(0.999,365)
print("每天努力1‰,一年后为{:.2f},每天慵1‰,一年后为{:.2f}".format(dayup1,daydown1))
# 1%的力量
dayup2 = pow(1.01,365)
daydown2 = pow(0.99,365)
print("每天努力1%,一年后为{:.2f},每天慵1%,一年后为{:.2f}".format(dayup2,daydown2))
#工作日努力1%,休息日不努力
dayup3 =1.0
dayfactor =0.01
for i in range(365):
if i % 7 in [6,0]:
dayup3 = dayup3*(1-dayfactor)
else:
dayup3 =dayup3*(1+dayfactor)
print("只在工作日努力,一年后为{:.2f}".format(dayup3))
print("So,每天努力1%,一年后的效果增加37倍")
努力吧,少年。