python計算利息

# coding:utf-8 s = 0 # 每個月存的本金 base = 5000 # 指望利率 rate = 1.05 year = 5 month = year*12 for i in range(0, month): s = s + base * pow(rate, i/12) print "本金+利息:", s print "本金:", base*month print "利息
相關文章
相關標籤/搜索