假設你每一年初往銀行帳戶中1000元錢,銀行的年利率爲4.7%。 一年後,你的帳戶餘額爲: 1000 * ( 1 + 0.047) = 1047 元 第二年初你又存入1000元,則兩年後帳戶餘額爲

代碼實現:python(3.7.0)python total = 0 for x in range(0,10):     total = (total+1000)*(1+0.047) print (total)  
相關文章
相關標籤/搜索