Untitled
plain_text
13 days ago
562 B
2
Indexable
Never
def calculate(): num1 = float(input('Введите число: ')) num2 = float(input('Введите число: ')) operation = input("Введите действие (+, -, *, /): ") if operation == "+": result = num1 + num2 elif operation == "-": result = num1 - num2 elif operation == "*": result = num1 * num2 elif operation == "/": result = num1 / num2 else: print("Некорректный ввод") return print("результат:", result)