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
>>> 


沒有留言:

張貼留言

ESP32 Telegram 指令選單(Bot Commands)

ESP32 Telegram 指令選單(Bot Commands)  /*******************************************************************  ***********************************...