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 19ccc52 commit f1817b5Copy full SHA for f1817b5
maths/division.py
@@ -48,7 +48,9 @@ def divide_numbers(a: float, b: float) -> float:
48
0.0
49
"""
50
if b == 0:
51
- raise ValueError("Cannot divide by zero. Please provide a non-zero denominator.")
+ raise ValueError(
52
+ "Cannot divide by zero. Please provide a non-zero denominator."
53
+ )
54
return a / b
55
56
@@ -60,7 +62,7 @@ def divide_numbers(a: float, b: float) -> float:
60
62
print(f"-10 / 2 = {divide_numbers(-10, 2)}")
61
63
print(f"7 / 2 = {divide_numbers(7, 2)}")
64
print(f"0 / 5 = {divide_numbers(0, 5)}")
-
65
+
66
# Test zero division error
67
try:
68
divide_numbers(10, 0)
0 commit comments