2018年1月8日 星期一

Python: Future value of a specified principal amount, rate of interest, and a number of years

Python: Future value of a specified principal amount, rate of interest, and a number of years

Python Basic: Exercise-39 with Solution

Write a Python program to compute the future value of a specified principal amount, rate of interest, and a number of years.
Sample Solution:-
amt = 10000
int = 3.5
years = 7
future_value  = amt*((1+(0.01*int)) ** years)
print(round(future_value,2))

============ RESTART: F:/Python_APSC/py-ex-basic-39.py ==========
12722.79
>>> 


沒有留言:

張貼留言

OPEN DATA AQI 空氣品質監測網 + NODE-RED

OPEN DATA AQI 空氣品質監測網 + NODE-RED  首頁 - 空氣品質監測網  https://airtw.moenv.gov.tw/ https://data.gov.tw/datasets/search?p=1&size=10&s=_score...