Python语言-NL-1‰的力量
程序员文章站
2022-03-03 10:19:47
...
- 一年365天,每天进步1‰,累计进步多少呢?
1.001365 - 一年365天,每天退步1‰,累计剩下多少呢?
0.999365
#DayDayUpQ1.py
dayup=pow(1.001,365)
daydown=pow(0.999,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\DayDayUpQ1.py ==================
向上:1.44,向下:0.69
>>>