Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monthlyInterestRate = annualInterestRate/12
- lowBnd = balance/12
- upBnd = (balance * (1 + monthlyInterestRate)**12)/12
- payment = (lowBnd + upBnd)/2.0
- MP = 12
- remaining = (balance)
- while balance > 0.00:
- balance = remaining
- MP = 0
- while MP < 13:
- if balance <= 0.0:
- lowBnd = payment
- else:
- upBnd = payment
- MP = MP + 1
- balance = (balance - ((lowBnd + upBnd)/2.0)) * (1 + monthlyInterestRate)
- print 'Lowest Payment: ', +(round(payment,2))
Add Comment
Please, Sign In to add comment