Write a python function to compute 5/0 using try except


Topic: Write a python function to compute 5/0 using try except

Solution

try:
print("Division = {}".format(5/0))
except ZeroDivisionError:
print ("5 cannot be divided by O")



List all Python Programs