xxxxxxxxxx
# Here is the simple version
compound_interest = initial * (1 + (rate/100))**periods_elapsed
xxxxxxxxxx
# Python3 program to find compound
# interest for given values.
def compound_interest(principal, rate, time):
# Calculates compound interest
Amount = principal * (pow((1 + rate / 100), time))
CI = Amount - principal
print("Compound interest is", CI)
# Driver Code
compound_interest(10000, 10.25, 5)