Skip to content

Commit 1778ddb

Browse files
authored
Create functions_zeynepnur_erten.py
1 parent 2024d08 commit 1778ddb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
This function is used to calculate a custom equation
6+
:param x: first base
7+
:param y: second base
8+
:param a: exponent for x
9+
:param b: exponent for y
10+
:param c: divisor
11+
:return: the result of equation (x**a + y**b)/c
12+
"""
13+
return float((x**a + y**b)/c)
14+
15+
counter = {}
16+
def fn_w_counter() -> (int, dict[str, int]):
17+
caller = __name__
18+
counter[caller] = counter.get(caller,0) + 1
19+
return sum(counter.values()), counter
20+

0 commit comments

Comments
 (0)