# 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 "利息:", s - base*month
python计算利息
最新推荐文章于 2025-03-04 23:56:43 发布