Guest User

Untitled

a guest
Jan 21st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. balance =
  2. annualInterestRate =
  3. monthlyPaymentRate =
  4. total = 0.0
  5.  
  6. for month in range(1,13):
  7.     payment = monthlyPaymentRate * balance
  8.     total += payment
  9.     interest = (balance - payment) * annualInterestRate / 12
  10.     balance = (balance - payment + interest)
  11.     print 'Month:', month
  12.     print 'Minimum monthly payment:', round(payment,2)
  13.     print 'Remaining balance:', round(balance,2)
  14. print 'Total paid:', round(total, 2)
  15. print 'Remaining balance:', round(balance, 2)
Add Comment
Please, Sign In to add comment