Guest User

Untitled

a guest
Jan 22nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. #Total Balance = 5000
  4. #Minimum monthly payment = 2%
  5. #Annual Interest Rate = 18%
  6.  
  7. balance = 5000
  8. mrate = 0.02
  9. arate = 0.18
  10. remain=balance
  11. bl=[];
  12.  
  13. for i in range(0,12):
  14.     print("1. Month: ",i)
  15.     payment = round(remain*mrate, 2)
  16.     interest = (remain-payment)*arate/12
  17.     balance = round(remain-interest, 2)
  18.     print ("2. Minimum monthly payment:", payment)
  19.     print ("3. Remaining balance",  balance)
  20.     bl.append(balance)
  21.     remain = remain-payment+interest
Add Comment
Please, Sign In to add comment