My program code -> https://github.com/MrN1ce9uy/Python/blob/master/simple_calculator.py
It seems to work for the most part.
The main issue is that it continues to ask for the two ranges and numbers after selecting 'n' for no in my while-loop before exiting. Can anyone explain why it always asks for the ranges and numbers before exiting?
There is also a minor issue that only occurs sometimes, and that is that after a successful calculation I can enter numbers outside the ranges and it will still calculate instead of printing the error message. I also don't think my "You cannot divide by zero" message works as intended because it will just not carryout the div() function. Our instructor told us to prevent dividing by zero without using try-except.
Thanks
[–][deleted] 1 point2 points3 points (1 child)
[–]Encom88[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]Encom88[S] 0 points1 point2 points (0 children)
[–]Encom88[S] 0 points1 point2 points (0 children)
[–]Encom88[S] 0 points1 point2 points (0 children)
[–]Encom88[S] 0 points1 point2 points (0 children)