Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- balance=int(raw_input('enter balance: '))
- annualInterestRate=float(raw_input('enter annual interest rate: '))
- monthlyInterestRate=annualInterestRate/12
- lowestPayment=int(round((balance/120),0)*10)
- while (lowestPayment*12)<((balance)*(1+annualInterestRate)):
- month=1
- newBalance=balance
- for month in range(0,12):
- newBalance=((newBalance-lowestPayment)*(1+monthlyInterestRate))
- month=month+1
- if newBalance<=0:
- print('Lowest Payment: ' + str(lowestPayment))
- break
- else:
- lowestPayment=lowestPayment+10
Add Comment
Please, Sign In to add comment