CBSE Class 11 Computer Science Question 23 of 63

Introduction to Python Modules — Question 4

Back to all questions
4
Question

Question 4

What is the value of x, if x = math.factorial(0) ?

  1. 1
  2. 0
  3. Error
  4. None of these
Answer

1

Reason — The math.factorial() function returns the factorial of a non-negative integer. By definition, the factorial of 0 is 1. Therefore, math.factorial(0) returns 1.