Python Program for compound interest
Compound Interest formula:
- Compound Interest = P(1 + R/100) t
- P is principle amount
- R is the rate
- T is the time
Source Code:
# interest for given values.
def compound_interest(principle, rate, time):
# Calculates compound interest
CI = principle * (pow((1 + rate / 100), time))
print("Compound interest is", CI)
CI = principle * (pow((1 + rate / 100), time))
print("Compound interest is", CI)
# Driver Code
compound_interest(10000, 10.25, 5)
compound_interest(10000, 10.25, 5)