This Python program takes a principal amount, interest rate, and time period as user input to calculate compound interest. It uses the compound interest formula to calculate the future value and compound interest amount, then prints the results.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
101 views1 page
Python Program To Find Compound Interest
This Python program takes a principal amount, interest rate, and time period as user input to calculate compound interest. It uses the compound interest formula to calculate the future value and compound interest amount, then prints the results.
print("Compound Interest for Principal Amount {0} = {1}".format(var_amount, ci_future))
print("Compound Interest for Principal Amount {0} = {1}".format(var_amount, compound_int))
OUTPUT
Please Enter the Principal Amount : 1000
Please Enter the Rate Of Interest : 10 Please Enter Time period in Years : 3 Compound Interest for Principal Amount 1000.0 = 1331.0000000000005 Compound Interest for Principal Amount 1000.0 = 331.00000000000045