Skip to content

Commit b31841b

Browse files
authored
Update calculator.py
1 parent 05832f5 commit b31841b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

calculator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ def multiplication(x: int, y: int) -> int:
3030

3131
def division(x: int, y: int) -> float:
3232
"""
33-
Divides two numbers using integer division.
33+
Divides two numbers.
3434
3535
Args:
3636
x (int): The first parameter.
3737
y (int): The second parameter.
3838
3939
Returns:
40-
int: `x` divided by `y` (integer division).
40+
float: The result of `x` divided by `y`.
4141
4242
Raises:
4343
ValueError: If `y` is zero.
4444
"""
4545
if y == 0:
4646
raise ValueError("Cannot divide by zero")
47-
return x // y
47+
return x / y # Floating-point division

0 commit comments

Comments
 (0)