Closed
Description
Testing #241791
I would expect to see inline values for at least line 15
given the other examples. But, I don't see any in this cell.
here's the code:
def divide_numbers(a, b):
try:
result = a / b
return result
except ZeroDivisionError:
return "Error: Division by zero!"
except TypeError:
return "Error: Invalid input types!"
finally:
print("Division operation attempted")
# Test error handling
print(divide_numbers(10, 2))
print(divide_numbers(10, 0))
print(divide_numbers(10, "2"))
Metadata
Metadata
Assignees
Labels
No labels