You are on page 1of 4

num1 = float(input("Enter the first number: "))

op = input("Enter the operator: ")


num2 = float(input("Enter the second number: "))

if (num1 or num2) >= 1000 or (num1 or num2) <= -1000:


print("Invalid number")
elif op == "+":
print(num1 + num2)
elif op == "-":
print(num1 - num2)
elif op == "*":
print((num1 * num2) * 2)
elif op == "/":
if num2 == 0:
print("‫)"חילוק לא תקין‬
else: print((num1 / num2) / 2)
else:
print("Invalid operator")

You might also like