Guest User

Untitled

a guest
Jan 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. startbalance = balance
  2. minmonth = 10
  3. months = 0
  4. monthlyinterest = annualInterestRate / 12
  5.  
  6. while(balance >= 0):
  7. balance = balance * (1 + monthlyinterest) - minmonth
  8. months = months + 1
  9.  
  10. if(months > 12):
  11. months = 0
  12. minmonth = minmonth+1
  13. balance = startbalance
  14.  
  15. else:
  16. if (balance <= 0):
  17. minmonth=int(round(minmonth, -1))
  18. print ("Lowest Payment: " + str(minmonth))
Add Comment
Please, Sign In to add comment