Loading…
Use a try-except block to handle division by zero. If dividing 10 by 0 triggers ZeroDivisionError, print 'Error: division by zero.'.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.