Skip to content

Commit 523c44d

Browse files
authored
Refactor custom_equation and fn_w_counter signatures
Updated function signatures for better clarity and consistency.
1 parent 86c0f4f commit 523c44d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎Week04/functions_melda_gungor.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
custom_power = lambda x=0, /, e=1: x**e
22

3-
def custom_equation(x: int = 0, y: int = 0, /, a: int =1 ,b: int =1,*,c: int=1) -> float:
3+
def custom_equation(x: int = 0 , y: int = 0 , / , a: int =1 , b: int =1, * , c: int=1) -> float:
44
"""
55
Calculates the custom equation.
66
:param x: first base
@@ -14,12 +14,13 @@ def custom_equation(x: int = 0, y: int = 0, /, a: int =1 ,b: int =1,*,c: int=1)
1414
:param c: divisor
1515
:type c: int
1616
:return: the result of (x**a + y**b) / c
17-
:rtype: float """
17+
:rtype: float
18+
"""
1819

1920
return float((x**a + y**b) / c)
2021

2122

22-
def fn_w_counter() -> tuple[int , dict[str,int]]:
23+
def fn_w_counter() -> (int, dict[str,int]):
2324
if not hasattr(fn_w_counter,"total_count"):
2425
fn_w_counter.total_count = 0
2526
fn_w_counter.call_records = {}

0 commit comments

Comments
 (0)