Python语言-NL-5‰和1%的力量

一年365天,每天进步5‰或1%,累计进步多少呢?

  • 一年365天,每天退步5‰或1%,累计剩下多少呢?
    1.005365 1.01365
    0.995365 0.99365
#DayDayUpQ2.py
dayfactor=0.005
dayup=pow(1+dayfactor,365)
daydown=pow(1-dayfactor,365)
print("向上:{:.2f},向下:{:.2f}".format(dayup,daydown))
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
================== RESTART: E:\SCUT\Python\Code\DayDayUpQ2.py ==================
向上:6.17,向下:0.16
>>> 
#DayDayUpQ2_1.py
dayfactor=0.01
dayup=pow(1+dayfactor,365)
daydown=pow(1-dayfactor,365)
print("向上:{:.2f},向下:{:.2f}".format(dayup,daydown))
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
================= RESTART: E:\SCUT\Python\Code\DayDayUpQ2_1.py =================
向上:37.78,向下:0.03
>>> 
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 游动-白 设计师: 上身试试
应支付0元
点击重新获取
扫码支付

支付成功即可阅读