CoCalc Public FilesMakeupWork / Done / 3-8Discussion.ipynbOpen with one click!
Author: Kaleb Cruz
Views : 86
Compute Environment: Ubuntu 20.04 (Default)

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.

In [4]:
def calc(p, r, n, t): p = 1000 for i in range(t): p = p * (1 + r/n) return p
In [6]:
calc(1000,0.033,12,10*12)
1390.3382740533493
In [7]:
calc(1000,0.033,12,10*12*4)
3736.645637648261
In [9]:
calc(1000,0.033,12,10*365*24)
3.0057251328007694e+107
In [ ]:
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