We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05832f5 commit b31841bCopy full SHA for b31841b
calculator.py
@@ -30,18 +30,18 @@ def multiplication(x: int, y: int) -> int:
30
31
def division(x: int, y: int) -> float:
32
"""
33
- Divides two numbers using integer division.
+ Divides two numbers.
34
35
Args:
36
x (int): The first parameter.
37
y (int): The second parameter.
38
39
Returns:
40
- int: `x` divided by `y` (integer division).
+ float: The result of `x` divided by `y`.
41
42
Raises:
43
ValueError: If `y` is zero.
44
45
if y == 0:
46
raise ValueError("Cannot divide by zero")
47
- return x // y
+ return x / y # Floating-point division
0 commit comments