ZeroDivisionError

The exception raised when a program divides by zero or takes a remainder by zero.

In more detail

It applies to /, // and %. Check the divisor first or catch the exception when zero is a possible input.

Related terms

Taught in

References

Certification courses