Guest User

Untitled

a guest
Jan 16th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. balance = 3200
  2. annualInterestRate = 0.2
  3. monthlyPaymentRate =annualInterestRate/12
  4. month = 1
  5. totalPaid = 0
  6.  
  7. while month < 13:
  8.     totalPaid += balance * monthlyPaymentRate
  9.     print "Month: " + str(month)
  10.     print "Minimum monthly payment: " + str(round(balance*monthlyPaymentRate, 2))
  11.     balance = (balance - (balance*monthlyPaymentRate))*(1+(annualInterestRate/12))
  12.     print "Remaining balance: " + str(round(balance, 2))
  13.     month += 1
  14. print "" + str(round(totalPaid, 2))
  15. print "Remaining balance: " + str(round(balance, 2))
Add Comment
Please, Sign In to add comment