From de8a85e5d43c9d7a1be4be094ff507559a7830f2 Mon Sep 17 00:00:00 2001 From: beytullaharslannn <151189674+beytullaharslannn@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:48:45 +0300 Subject: [PATCH 1/2] Create functions_beytullah_arslan.py --- Week04/functions_beytullah_arslan.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Week04/functions_beytullah_arslan.py diff --git a/Week04/functions_beytullah_arslan.py b/Week04/functions_beytullah_arslan.py new file mode 100644 index 00000000..355903cd --- /dev/null +++ b/Week04/functions_beytullah_arslan.py @@ -0,0 +1,28 @@ +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: + """ + This function calculates a custom equation with the given five integers. + + :param x: First base value + :param y: Second base value + :param a: Exponent of variable x + :param b: Exponent of variable y + :param c: Divisor value + :return: The float result of the operation + """ + + return (x**a + y**b) / c + +def fn_w_counter() -> tuple[int, dict[str, int]]: + if not hasattr(fn_w_counter,'call_counter'): + fn_w_counter.call_counter = 0 + fn_w_counter.caller_dict = {} + caller = __name__ + fn_w_counter.call_counter += 1 + if caller in fn_w_counter.caller_dict: + fn_w_counter.caller_dict[caller] += 1 + else: + fn_w_counter.caller_dict[caller] = 1 + return fn_w_counter.call_counter,fn_w_counter.caller_dict + From 0c9f57646ae415e091171a97c240a92affd2bce4 Mon Sep 17 00:00:00 2001 From: beytullaharslannn <151189674+beytullaharslannn@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:50:57 +0300 Subject: [PATCH 2/2] Update functions_beytullah_arslan.py --- Week04/functions_beytullah_arslan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Week04/functions_beytullah_arslan.py b/Week04/functions_beytullah_arslan.py index 355903cd..78a09c78 100644 --- a/Week04/functions_beytullah_arslan.py +++ b/Week04/functions_beytullah_arslan.py @@ -14,7 +14,7 @@ def custom_equation(x: int = 0 , y: int = 0 , / , a: int = 1 , b: int = 1 , * , return (x**a + y**b) / c -def fn_w_counter() -> tuple[int, dict[str, int]]: +def fn_w_counter() -> (int, dict[str, int]): if not hasattr(fn_w_counter,'call_counter'): fn_w_counter.call_counter = 0 fn_w_counter.caller_dict = {}