18 lines
294 B
Python
18 lines
294 B
Python
a = float(input())
|
|
operation = input("Операция (+, -, *, /): ")
|
|
b = float(input())
|
|
|
|
if operation == "+":
|
|
print(a+b)
|
|
|
|
elif operation == "*":
|
|
print(a*b)
|
|
|
|
elif operation == "-":
|
|
print(a-b)
|
|
|
|
elif operation == "/":
|
|
print(a/b)
|
|
|
|
else:
|
|
print("Ошибка") |