假设你每年初往银行账户中1000元钱,银行的年利率为4.7%。 一年后,你的账户余额为: 1000 * ( 1 + 0.047) = 1047 元 第二年初你又存入1000元,则两年后账户余额为

代码实现:python(3.7.0)

total = 0
for x in range(0,10):
    total = (total+1000)*(1+0.047)
print (total)
 

猜你喜欢

转载自blog.csdn.net/qq_42194332/article/details/81330912