17 lines
464 B
Python
17 lines
464 B
Python
num1 = float(input("ввелите 1 число:"))
|
|
num2 = float(input("ввелите 2 число:"))
|
|
operator = (input("введите знак:+,*,-,/:"))
|
|
if operator == "+":
|
|
result = num1 + num2
|
|
print(result)
|
|
elif operator == "*":
|
|
result = num1 * num2
|
|
print(result)
|
|
elif operator == "-":
|
|
result = num1 - num2
|
|
print(result)
|
|
elif operator == "/":
|
|
result = num1 / num2
|
|
print(result)
|
|
else:
|
|
print("ошибка") |