| Hosted by CoCalc | Download
Kernel: Python 3 (system-wide)

Suppose that have a savings account with $1,000 that offers an annual interest rate of 3.3. Determine the value of the account of after 10 years if the interest rate is compounded:

  1. monthly,

  2. weekly,

  3. hourly, and

  4. by the second.

Conjecture what happens as the number of compounding per year increases.

def calc(p, r, n, t): p = 1000 for i in range(t): p = p * (1 + r/n) return p
calc(1000,0.033,12,10*12)
1390.3382740533493
calc(1000,0.033,12,10*12*4)
3736.645637648261
calc(1000,0.033,12,10*365*24)
3.0057251328007694e+107
calc(1000,0.033,12,10*365*24*60*60)

The more compounding per year seems to make the amount in the savings account increase exponentially. Which makes sense since the amount of compounding also increases exponentially