Jul-20-2018, 12:04 AM
Fixed it, thanks for all your help. In the end I used this.
monthlyInterestrate=annualInterestRate/12 balance_initial=balance lowerbound=(1/12)*balance upperbound=balance*(1+monthlyInterestrate)**(12)/12 while balance >.0001 or balance<-.0001: balance=balance_initial monthlyPayment=(upperbound+lowerbound)/2 for i in range(12): balance=balance-monthlyPayment + (balance-monthlyPayment)*monthlyInterestrate if balance>0: lowerbound=monthlyPayment if balance<0: upperbound=monthlyPayment print('Lowest Payment: ' + str(round(monthlyPayment, 2)))