feat: created lab-02 dir and problem-01 file

This commit is contained in:
baphim
2026-09-12 20:06:47 -04:00
parent cc0c85d640
commit 43de8dc79c
+12
View File
@@ -0,0 +1,12 @@
# Write a Python program to handle a ZeroDivisionError exception when dividing a number by zero
def divide(x, y)
try:
# try to divide the provided values and store in variable: answer
answer = x / y
print(answer)
except ZeroDivisionError:
print("Enter a non-zero value")
divide(6, 2)