how to build a better calculator in python code example
Example: how to build a better calculator in python
Copynum1 = int(input("num1: "))
op = input("Operator: ")
num1 = int(input("num1: "))
if op == "+":
print(num1 + num2)
elif op == "-":
print(num1 - num2)
elif op == "/":
print(num1 / num2)
elif op == "*":
print(num1 * num2)
else:
print("Invalid Operator")