CBSE Class 11 Computer Science Question 26 of 63

Introduction to Python Modules — Question 7

Back to all questions
7
Question

Question 7

What value will be displayed on executing the following arithmetic expression?

x = math.pow (0,-4)

  1. 1
  2. 16
  3. DomainError
  4. None of these
Answer

DomainError

Reason — The math.pow() function computes the power of a number. In math.pow(0, -4), the expression represents 0 −4, which results in DomainError.