日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python计算连续复利_复利的Python程序

發(fā)布時間:2023/12/14 python 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python计算连续复利_复利的Python程序 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

python計算連續(xù)復(fù)利

Given principle amount, rate and time and we have to find the compound interest in Python.

給定原理量,速率和時間,我們必須找到Python的復(fù)利 。

計算復(fù)利 (Calculate compound interest)

To calculate compound interest, we use the following formula,

要計算復(fù)利,我們使用以下公式,

P(1 + R / 100)T

Where,

哪里,

  • P – Principle amount

    P –本金

  • R – Rate of the interest, and

    R –利率,以及

  • T – Time in the years

    T –歲月

Example:

例:

Input:p = 250000r = 36t = 1# formulaci = p * (pow((1 + r / 100), t)) print(ci)Output:339999.99999999994

Python程序找到復(fù)利 (Python program to find compound interest)

# Python program to find compound interest p = float(input("Enter the principle amount : ")) r = float(input("Enter the rate of interest : ")) t = float(input("Enter the time in the years: "))# calculating compound interest ci = p * (pow((1 + r / 100), t)) # printing the values print("Principle amount : ", p) print("Interest rate : ", r) print("Time in years : ", t) print("compound Interest : ", ci)

Output

輸出量

First run: Enter the principle amount : 10000 Enter the rate of interest : 3.5 Enter the time in the years: 1 Principle amount : 10000.0 Interest rate : 3.5 Time in years : 1.0 compound Interest : 10350.0Second run: Enter the principle amount : 250000 Enter the rate of interest : 36 Enter the time in the years: 1 Principle amount : 250000.0 Interest rate : 36.0 Time in years : 1.0 compound Interest : 339999.99999999994

翻譯自: https://www.includehelp.com/python/program-for-compound-interest.aspx

python計算連續(xù)復(fù)利

總結(jié)

以上是生活随笔為你收集整理的python计算连续复利_复利的Python程序的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。