An individual wants to be able to spend €80,000 per year for an anticipated 25 years in retirement. To fund this retirement account, he will make annual deposits of €6,608 at the end of each of his working years. He can earn 6% compounded annually on all investments. The minimum number of deposits that are needed to reach his retirement goal is closest to:
def calculate_needed_num(deposit_money,cost_money,cost_years,return_rate):
count=1
while True:
net_money=0
for i in range(count):
net_money=net_money*(1+return_rate)+deposit_money
for i in range(25):
net_money=(net_money-cost_money)*(1+return_rate)
if net_money>=0:
return count
count+=1
calculate_needed_num(6608,80000,25,0.06)
得到41