av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

Python程序:計算復(fù)利

創(chuàng)新互聯(lián)python教程:

我們提供的服務(wù)有:成都網(wǎng)站設(shè)計、成都做網(wǎng)站、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、海城ssl等。為上千多家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的海城網(wǎng)站制作公司

用例子寫一個計算復(fù)利的 Python 程序。在我們開始 Python 復(fù)利程序之前,讓我向您展示復(fù)利背后的公式:

未來 CI =本金金額* ( 1 + ROI ) 年數(shù) )

上述計算稱為未來復(fù)利。因為它包含本金和配置項。獲取復(fù)利:復(fù)利=未來配置項-本金

計算復(fù)利的 Python 程序

這個 python 程序允許用戶輸入本金金額、利率和時間段(年數(shù))。使用這些值, Python 使用上面指定的公式計算復(fù)利。

import math

princ_amount = float(input(" Please Enter the Principal Amount : "))
rate_of_int = float(input(" Please Enter the Rate Of Interest   : "))
time_period = float(input(" Please Enter Time period in Years   : "))

ci_future = princ_amount * (math.pow((1 + rate_of_int / 100), time_period)) 
compound_int = ci_future - princ_amount

print("Future Compound Interest for Principal Amount {0} = {1}".format(princ_amount, ci_future))
print("Compound Interest for Principal Amount {0} = {1}".format(princ_amount, compound_int))


名稱欄目:Python程序:計算復(fù)利
網(wǎng)站鏈接:http://uogjgqi.cn/article/cdpidpi.html
掃二維碼與項目經(jīng)理溝通

我們在微信上24小時期待你的聲音

解答本文疑問/技術(shù)咨詢/運營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流