18 lines
394 B
Python
18 lines
394 B
Python
a = float(input("Введите первое число: "))
|
|
operation = input("Выберите операцию: \n+ * - / \n")
|
|
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("Ошибка") |