Skip to content

Commit 06cd05c

Browse files
committed
Created functions_tarik_bozgan.py
1 parent 4f332ed commit 06cd05c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Week04/functions_tarik_bozgan.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def custom_power(x, e=1):
2+
return x ** e
3+
4+
def custom_equation(x, y, a=1, b=1, *, c=1):
5+
return (x ** a + y ** b) / c
6+
7+
call_counts = {}
8+
9+
def fn_w_counter():
10+
caller_name = __import__('inspect').currentframe().f_back.f_code.co_name
11+
call_counts[caller_name] = call_counts.get(caller_name, 0) + 1
12+
return (call_counts[caller_name], {k: v for k, v in call_counts.items()})

0 commit comments

Comments
 (0)