Skip to content

Commit 449d7ef

Browse files
authored
Week 04 hw
1 parent d66680f commit 449d7ef

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

‎Week04/functions_ilyas_bugra_filoglu.py‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
custom_power = lambda x=0,/,e=1: x ** e
1+
custom_pow = lambda a=0,/,e=1: a ** e
22

3-
def custom_equation(x: int = 0 , y: int = 0, / , a: int = 1, b: int = 1, * , c: int = 1) -> float:
4-
return (x**a + y**b) / c
3+
def custom_equation(a: int = 0 , b: int = 0, / , x: int = 1, y: int = 1, * , z: int = 1) -> float:
4+
"""
5+
Calculate the custom equation (a**x + b**y) / z.
6+
7+
:param a: first base
8+
:param b: second base
9+
:param x: first exponent
10+
:param y: second exponent
11+
:param z: divisor
12+
:return: the computed float result
13+
"""
14+
return (a**x + b**y) / z
515

616

717
def fn_w_counter() -> (int, dict[str, int]):

0 commit comments

Comments
 (0)