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


沒有留言:

張貼留言

使用 ICDT的 MQTT WS HMI MQTT Port = 8000 與 Wokwi ESP32 MQTT port=1883 資料交換

使用 ICDT的 MQTT WS HMI  MQTT Port = 8000  與 Wokwi ESP32 MQTT port=1883  資料交換   這個系統是一個典型的 工業物聯網 (IIoT) 遠端監控架構 。它結合了硬體模擬、雲端訊息中轉以及網頁圖控介面,讓您能透過瀏覽...