Skip to content

Commit 60d571f

Browse files
authored
Update calculator.py
1 parent 431caa7 commit 60d571f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

calculator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ def division(x: int, y: int) -> int:
4848
Returns:
4949
int: `x` divided by `y`.
5050
"""
51+
if y == 0:
52+
raise ValueError("You can not divide by 0"
5153
return x // y

0 commit comments

Comments
 (0)