Python練習題-TQC+(309)-存款總額

文、意如

money = eval(input())
ga = eval(input())
month = eval(input())
print("{} \t  {}".format("Month","Amount")) #\t 代表tab(縮排,四個空格)
tot = money
for i in range(1,month+1):
    tot = tot+tot*ga/1200
    print("{:3d} \t {:.2f}".format(i,tot)) #3d = 3代表寬 d 整數

Yiru@Studio - 關於我 - 意如