Questenaتمرینی که نشان می‌دهد بعد چه چیزی را مرور کنید
سؤال 94

Which exception type results from evaluating 7 % 0?

  1. ValueError
  2. ZeroDivisionErrorپاسخ درست
  3. TypeError
  4. It returns 0

توضیح

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.

ادامهٔ این آزمون

شروع تمرین
سؤال 94: Which exception type results from evaluating 7 % 0? · Python Fundamentals · Questena