Which exception type results from evaluating 7 % 0?
Explanation
Modulo by numeric zero has no defined finite result in Python, so the operation raises ZeroDivisionError. Returning zero would confuse a zero remainder with an invalid zero divisor.
Modulo by numeric zero has no defined finite result in Python, so the operation raises ZeroDivisionError. Returning zero would confuse a zero remainder with an invalid zero divisor.