/
Nik_voz
/
rgpu_python_analysis
Обзор
Документация
Войти
/
Nik_voz
/
rgpu_python_analysis
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
python_analysis/assignment_operator.py
34 строки
782 B
«Nick-voz»
feat: Add assignment operator functions and tests
16 фев 2025, 00:46
16 фев 2025, 00:46
49a6ec6
Код
Авторство
О чём код?
from math import pi from math import sqrt def assignment_operator_1(x: int, y: int) -> float: divisable = 2 * x + sqrt(y) - (x + y) divisor = y + (1 / abs(x**2 - 4**x)) return divisable / divisor def assignment_operator_2(x: int, y: int) -> float: # left dividend = abs(x + y) divisor = y ** (x + 1) + 1 left = dividend / divisor # right dividend = x * y - 12 divisor = sqrt(34 + x) right = dividend / divisor return left - right def assignment_operator_3(a: int) -> tuple[int, int]: return a**3, a**2 def assignment_operator_4(r: int) -> tuple[float, float]: return 2 * pi * r, pi * r**2 def assignment_operator_5() -> int: num = input("insert number") a, b, c, *_ = map(int, num) return sum((a, b, c))