Answers for "Code example of Python Modulo Operator with Exception handling"

0

Code example of Python Modulo Operator with Exception handling

# inputs
a = 14
b = 0
  
# exception handling
try:
    print(a, 'mod', b, '=', a % b, sep = " ")
      
except ZeroDivisionError as err:
    print('Cannot divide by zero!' + ' Change the value of the right operand.')
Posted by: Guest on April-09-2022

Code answers related to "Code example of Python Modulo Operator with Exception handling"

Python Answers by Framework

Browse Popular Code Answers by Language