15 lines
279 B
Python
15 lines
279 B
Python
#!/usr/bin/python3
|
|
#coding:utf-8
|
|
start = 4500
|
|
month = 12
|
|
rate = 0.027
|
|
money = 0
|
|
|
|
for i in range(1, month):
|
|
rate_money = start * rate / 12
|
|
print("第%d个月的利息为:%f\n" % (i, rate_money))
|
|
money = money + rate_money
|
|
start = start - 5000 / 12
|
|
|
|
print(money)
|