From e15874cc386359d4faf2d52c5f505b5653831506 Mon Sep 17 00:00:00 2001 From: oksevval <119163171+oksevval@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:16:39 +0300 Subject: [PATCH] Create functions_Sevval_Ok.py --- Week04/functions_Sevval_Ok.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Week04/functions_Sevval_Ok.py diff --git a/Week04/functions_Sevval_Ok.py b/Week04/functions_Sevval_Ok.py new file mode 100644 index 00000000..f81f89d9 --- /dev/null +++ b/Week04/functions_Sevval_Ok.py @@ -0,0 +1,24 @@ +custom_power = lambda x=0, /, e=1: x ** e + +def custom_equation( + x: int = 0, + y: int = 0, + /, + a: int = 1, + b: int = 1, + *, + c: int = 1 +) -> float: + return (x ** a + y ** b) / c + +_call_total = 0 +_callers = {} + +def fn_w_counter(): + global _call_total, _callers + + caller = __name__ + _call_total += 1 + _callers[caller] = _callers.get(caller, 0) + 1 + + return _call_total, _callers