问题1
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/fb3af174b764b2f364c57afa2a7e6614.png)
解题代码1
dayup = pow(1.001, 365)
daydown = pow(0.999, 365)
print("向上:{:.2f},向下:{:.2f}".format(dayup, daydown))
运行结果1
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/52a4658d78fbedb854e17a01dcc87ef5.png)
问题2
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/16cfee259a543626ce9a6e369abced73.png)
解题代码2
dayfactor = 0.005
dayup = pow(1+dayfactor, 365)
daydown = pow(1-dayfactor, 365)
print("向上:{:.2f},向下:{:.2f}".format(dayup, daydown))
运行结果2
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/23464f3a5ae515badd4978150115ffb2.png)
问题3
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/bee828a5effbe902d0e4b9a425254f0e.png)
解题代码3
dayup = 1.0
dayfactor = 0.01
for i in range(365):
if i % 7 in [6,0]:
dayup = dayup*(1-dayfactor)
else:
dayup = dayup*(1+dayfactor)
print("工作日的力量:{:.2f} ".format(dayup))
运行结果3
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/6f34500bfcb6b43e58bd21b7eb8aa054.png)
问题4
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c32c419f6543ffed35c9aff8c0798931.png)
解题代码4
def dayUP(df):
dayup = 1
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))
运行结果4
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/1184dc7fccd31d3dd8ded7d918496051.png)