We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1eaf28c commit 494b62cCopy full SHA for 494b62c
1 file changed
Week04/functions_tarik_bozgan.py
@@ -1,3 +1,4 @@
1
+# custom_power (lambda)
2
custom_power = lambda x=0, e=1: x ** e
3
4
@@ -22,22 +23,10 @@ def custom_equation(
22
23
24
return (x ** a + y ** b) / c
25
-<<<<<<< HEAD
26
-def fn_w_counter() -> tuple[int, dict[str, int]]:
27
- caller = __name__
28
-
29
- fn_w_counter.total = getattr(fn_w_counter, "total", 0) + 1
30
- fn_w_counter.callers = getattr(fn_w_counter, "callers", {})
31
32
- fn_w_counter.callers[caller] = fn_w_counter.callers.get(caller, 0) + 1
33
34
- return fn_w_counter.total, fn_w_counter.callers.copy()
35
-=======
36
37
_call_count = 0
38
39
def fn_w_counter() -> (int, dict[str, int]):
40
global _call_count
41
_call_count += 1
42
- return _call_count, {__name__: _call_count}
43
->>>>>>> 6d9c8062 (Bugs fixed)
+ return _call_count, {__name__: _call_count}
0 commit comments