Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Week04/custom_equation_gamze_kilinc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
def custom_equation(
x: int = 0,
y: int = 0,
/,
a: int = 1,
b: int = 1,
*,
c: int = 1
) -> float:
"""
Calculates a custom mathematical equation.

:param x: First positional-only integer value.
:param y: Second positional-only integer value.
:param a: Exponent for x.
:param b: Exponent for y.
:param c: Divisor value.
:return: The result of (x**a + y**b) / c as a float.
"""
return (x ** a + y ** b) / c