balance = 5000
monthlyPaymentRate = 0.02
annualInterestRate = 0.18
total = 0

for i in range(12):
    minPay = balance* monthlyPaymentRate
    total = total + minPay
    Ub = balance - minPay
    balance = Ub*(1 + annualInterestRate/12.0)
    print("Month: ") + str(i+1)
    print("Minimum monthly payment: ") + str(round(minPay,2))
    print("Remaining balance: ") + str(round(balance,2))

print("Total paid: ") + str(round(total,2))
print("Remaining balance: ") + str(round(balance,2))