| Hosted by CoCalc | Download
Kernel: Python 3 (system-wide)
def savings_forloop(p,r,n,c,t): for i in range(t): a = p*(1+r/n) + c return a
savings_forloop(1000,.033,12,0,120) #1-Monthly
1390.3382740533493
savings_forloop(1000,.033,52,0,520) #2-Weekly
1390.8225472619663
savings_forloop(1000,.033,24,0,240) #3-Hourly
1390.6528772794236
savings_forloop(1000,.033,3600,0,36000) #4-By the Second
1390.9660246363771