Skip to content

Commit bb963f4

Browse files
Create functions_egehan_hatipoglu.py
1 parent b60efee commit bb963f4

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
custom_power = lambda x=0,/,e=1: x ** e
2+
3+
def custom_equation(x: int = 0 , y: int = 0, / , a: int = 1, b: int = 1, * , c: int = 1) -> float:
4+
"""
5+
Calculate the custom equation (x**a + y**b) / c.
6+
7+
:param x: first base
8+
:param y: second base
9+
:param a: first exponent
10+
:param b: second exponent
11+
:param c: divisor
12+
:return: the computed float result
13+
"""
14+
return (x**a + y**b) / c
15+
16+
17+
def fn_w_counter() -> (int, dict[str, int]):
18+
19+
if not hasattr(fn_w_counter,'call_counter'):
20+
21+
fn_w_counter.call_counter = 0
22+
fn_w_counter.caller_dict = {}
23+
caller = __name__
24+
fn_w_counter.call_counter += 1
25+
26+
if caller in fn_w_counter.caller_dict:
27+
fn_w_counter.caller_dict[caller] += 1
28+
else:
29+
fn_w_counter.caller_dict[caller] = 1
30+
return fn_w_counter.call_counter,fn_w_counter.caller_dict

0 commit comments

Comments
 (0)