Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- y=balance
- cmin=balance/12
- cmax=(balance*(1+(annualInterestRate/12))**12)/12
- while y>0:
- c=(cmin+cmax)*0.5
- y=(balance-c)*(1+annualInterestRate/12)
- for Month in range (2,13):
- y=(y-c)*(1+annualInterestRate/12)
- if y>0:
- cmin=c
- elif y<=-0.01:
- cmax=c
- y=abs(y)
- else:
- print('Lowest Payment:')+str(round(c,2))
Add Comment
Please, Sign In to add comment