ZeroDivisionError
Python raises a zero division error when when the second argument of a division or modulo operation is zero.
Note that the text of the error message depends on the implementation. Different versions of Python and different checking tools will give slightly different messages.
width / 0ZeroDivisionError: division by zero
5 % 0ZeroDivisionError: integer modulo by zero

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version a9143b0 (Sun, 14 Dec 2025 12:09:46 GMT)