Guest User

Untitled

a guest
Jan 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. balance=int(raw_input('enter balance: '))
  2. annualInterestRate=float(raw_input('enter annual interest rate: '))
  3.  
  4. monthlyInterestRate=annualInterestRate/12
  5.  
  6. lowestPayment=int(round((balance/120),0)*10)
  7.  
  8. while (lowestPayment*12)<((balance)*(1+annualInterestRate)):
  9. month=1
  10. newBalance=balance
  11. for month in range(0,12):
  12. newBalance=((newBalance-lowestPayment)*(1+monthlyInterestRate))
  13. month=month+1
  14. if newBalance<=0:
  15. print('Lowest Payment: ' + str(lowestPayment))
  16. break
  17. else:
  18. lowestPayment=lowestPayment+10
Add Comment
Please, Sign In to add comment