Describe the bug
If you press an operator before writing any number, it breaks. Output error shown:
Traceback (most recent call last):
File "D:\gui_calculator\calculator_main.py", line 114, in plus
if ((exist_text[-1] == "+") | (exist_text[-1] == "-") | (exist_text[-1] == "*") | (exist_text[-1] == "/") | (
~~~~~~~~~~^^^^
IndexError: string index out of range
Expected behavior
In Windows' calculator, number 0 is already pre-written. Operator selected applies over that 0. If new operators are chosen, old operator updates while keeping the 0.
Describe the bug
If you press an operator before writing any number, it breaks. Output error shown:
Expected behavior
In Windows' calculator, number 0 is already pre-written. Operator selected applies over that 0. If new operators are chosen, old operator updates while keeping the 0.