This code is made in python you can use it to calculate your return on saving, you have to specify you initial credit and monthly saving, along with number of years to save.
initial_credit = 200_000 # initial saving amount
years = 10 # years to save
interest = 0.03 # interest rate per year
credits = initial_credit
montly_investment = 10_000 # monthly saving
for y in range(years):
for m in range(12):
monthly_interest = (credits * (interest/12)) # calculate montly profit
# adding monthly profit and monthly saving, with credits
credits += (monthly_interest + montly_investment)
# show new credit value, show monthly profit through only saving interest
print(credits, ", ",monthly_interest)
No comments:
Post a Comment