Exception Handling
PYTHON
try:
x = 1 / 0
except ZeroDivisionError:
print("Cannot divide by zero")Try it Yourself
Run this PYTHON example in your local environment or course sandbox.
Python Tutorial
Source: Bro Code
try:
x = 1 / 0
except ZeroDivisionError:
print("Cannot divide by zero")