Skip to content

Commit 494b62c

Browse files
committed
Bugs fixed
1 parent 1eaf28c commit 494b62c

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

Week04/functions_tarik_bozgan.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# custom_power (lambda)
12
custom_power = lambda x=0, e=1: x ** e
23

34

@@ -22,22 +23,10 @@ def custom_equation(
2223

2324
return (x ** a + y ** b) / c
2425

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-
=======
3626

3727
_call_count = 0
3828

3929
def fn_w_counter() -> (int, dict[str, int]):
4030
global _call_count
4131
_call_count += 1
42-
return _call_count, {__name__: _call_count}
43-
>>>>>>> 6d9c8062 (Bugs fixed)
32+
return _call_count, {__name__: _call_count}

0 commit comments

Comments
 (0)