Skip to content

Commit e15874c

Browse files
authored
Create functions_Sevval_Ok.py
1 parent 71f5b39 commit e15874c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Week04/functions_Sevval_Ok.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
custom_power = lambda x=0, /, e=1: x ** e
2+
3+
def custom_equation(
4+
x: int = 0,
5+
y: int = 0,
6+
/,
7+
a: int = 1,
8+
b: int = 1,
9+
*,
10+
c: int = 1
11+
) -> float:
12+
return (x ** a + y ** b) / c
13+
14+
_call_total = 0
15+
_callers = {}
16+
17+
def fn_w_counter():
18+
global _call_total, _callers
19+
20+
caller = __name__
21+
_call_total += 1
22+
_callers[caller] = _callers.get(caller, 0) + 1
23+
24+
return _call_total, _callers

0 commit comments

Comments
 (0)