import math
import cmath
def add(x, y): return x + y
def subtract(x, y): return x - y
def multiply(x, y): return x * y
def divide(x, y):
if y == 0:
return "Ошибка: Деление на ноль!"
return x / y
def power(x, y): return x ** y
def square_root(x):
if x < 0:
return "Ошибка: Негативный корень!"
return math.sqrt(x)
def sin_function(angle):
"""Вычисляет синус угла в градусах."""
radians = math.radians(angle)
return math.sin(radians)
def cos_function(angle):
"""Вычисляет косинус угла в градусах."""
radians = math.radians(angle)
return math.cos(radians)
def complex_operations():
real = float(input("Введите действительную часть комплексного числа: "))
imag = float(input("Введите мнимую часть комплексного числа: "))
z = complex(real, imag)
print(f"Комплексное число: {z}")
print(f"Модуль: {abs(z)}")
print(f"Аргумент: {cmath.phase(z)}")
def trigonometric_functions():
angle = float(input("Введите угол в г