Basic binary search algorithm - wrangling with while loops and their conditions (x2)

I’ll offer one suggestion: execute the code by hand, sketching your input list and the positions of your indexes as execution proceeds. Binary search algorithms typically end when the right and left indexes meet or cross. It sounds to me like you’re failing to consider one of those cases. Alternately, you may be failing to adjust one index or the other correctly. (Note: I didn’t look at your code. Much too early and not yet enough coffee in the tank.)