If you break every cycle of the inner while, you stay less than 13.
And it goes on and on as you continue While True and not update your guess .
I am afraid that you are faced with an endless cycle.
Your break statement breaks the closest loop, i.e. the While month < 13 loop. The next line is not readable. guess not updated. While True not broken.
Perhaps you wanted to say
while month < 13: unpaidBalance= unpaidBalance-guess if unpaidBalance <= -0.1: low = guess elif unpaidBalance >= 0.1: high = guess month += 1 guess = (low + high)/2
octoback
source share