spacepaste

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
def ccBal(balance, annualInterestRate, monthlyPaymentRate):
    totalPaid = 0
    for month in range(1,13):
        minMonthlyPayment = monthlyPaymentRate * balance
        totalPaid += minMonthlyPayment
        balance = (balance - minMonthlyPayment) * (1 + (annualInterestRate / 
        print 'Month: ' + str(month)
        print 'Minimum monthly payment: ' + str(round(minMonthlyPayment, 
        print 'Remaining balance: ' + str(round(balance, 2))
    print 'Total paid: ' + str(round(totalPaid, 2))
    print 'Remaining balance: ' + str(round(balance, 2))