Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 19
Image: ubuntu2004
Kernel: Python 3 (system-wide)
def com_int(p,r,n,c,y): for i in range(n*y): p = p*(1+r/n)+c return p
com_int(1400,0.034,12,50,2)
2738.291988214431

This would mean that if someone deposits $ 1,400 into an account with an interest rate of 3.4% along with 50dollarsamonthfor2years,theaccountwouldbe50 dollars a month for 2 years, the account would be 2,738.29.

com_int(1400,0.034,12,60,3)
3820.734243408963
2738.29+3820.73
6559.02

So after the 2 years, this person is able to put in $ 60 a month and they would like to know how much the account is worth after 5 years. The account after 5 years would be worth $6,559.02