Guest User

Untitled

a guest
Jan 16th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. balance = 3926
  2. annualInterestRate = 0.2
  3. minMonthPay = 10
  4. month = 0
  5.  
  6. while balance > 0:
  7.     month = 0
  8.     while month in range(1,13):
  9.             month += 1
  10.             monthlyInterestRate = annualInterestRate / 12
  11.             updatedBalance = (balance - minMonthPay) * (1 + monthlyInterestRate)
  12.             balance = updatedBalance
  13.             if updatedBalance <= 0 is false:
  14.                 minMonthPay += 10
  15.             if balance < 0:    
  16.                 break
  17.     print ('Lowest Payment: ' + str(minMonthPay - 10))
Add Comment
Please, Sign In to add comment