0% 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.

Uploaded by

Arunava Basu
Copyright
© © All Rights Reserved
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% 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.

Uploaded by

Arunava Basu
Copyright
© © All Rights Reserved
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
You are on page 1/ 1

Python Program to find Compound Interest

# Find Compound Interest

import math

var_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 = var_amount * (math.pow((1 + rate_of_int / 100), time_period))


compound_int = ci_future - var_amount

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

You might also like