在 round 函数中,作为第二个参数的数字 2 是什么意思?
##This is a program that calcs your credit card, and compounds down the total
a=float(raw_input("Enter the outstanding balance on your credit card:"))
b=float(raw_input("Enter the annual crdit card interest rate as a deicimal:"))
c=float(raw_input("Enter the minimum monthly payment as a decimal:"))
for month in range(1, 13):
print "Month: ", str(month)
MMP = round((c * a),2) ##the 2 here and below, what does it do?
print "Minimum monthly payment: ", MMP
IP = round((b/12 * a),2)
print "Interest payed: ", IP
PP = round(((c*a) - ((b/12)*a)),2)
print "principal payed: ", PP
a = round((a - PP),2)
print "Remaining balance", a