I was still only able to get 4 values in the output file.
the values were 1 26 88 and 4.
however the last values in the program were not a= 26 or b =88... they were a=35 and b=95.
it turns out that 22/88 was the first problem displayed in the prompt by the program... so the function is storing the correct a,b, and operator into the output file however it is not moving past those first initial values.
EDIT: I got the values to display by moving the output_file.close() outside of the while loop.