Simple Calculator
imcraft (5)

Simple Calculator I made. Just select which math operation you want then type the two numbers you need!

You are viewing a single comment. View All
ChezCoder (128)

add validators to test if numbers entered are valid.
If you entered 4, 1, 0, then it would give a zero division error.

Traceback (most recent call last):
  File "main.py", line 28, in <module>
    print(num1,"/",num2,"=", divide(num1,num2))
  File "main.py", line 11, in divide
    return x / y
ZeroDivisionError: float division by zero