1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
totalpaid = 0
month = 1

while (month<=12):
    monthlyInterestRate = annualInterestRate / 12 
    minpay = monthlyPaymentRate*balance
    newbalance = (balance - minpay) * (1 + monthlyInterestRate)
    print ('Month: ' + str(month))
    print ('Minimum monthly payment: ' + str(round(minpay,2)))
    print ('Remaining balance: ' + str(round(newbalance,2)))
    balance = newbalance
    month += 1
    totalpaid += round(minpay,2)
print ('Total paid: ' + str(totalpaid))
print ('Remaining balance: ' + str(round(newbalance,2)))

This paste never expires. View raw. Pasted through import.