Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. balance = 4773
  2. annualInterestRate = 0.2
  3. mIR = annualInterestRate / 12
  4. minPay = 10
  5. remain = balance
  6.  
  7. while remain >= 0:
  8.     minPay += 10
  9.     remain = balance
  10.     month = 1    
  11.    
  12.     while month <= 12 and remain >= 0:
  13.         remain -= minPay
  14.         interest = mIR * remain
  15.         remain += interest
  16.         month += 1
  17.            
  18. print(minPay)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement