KnowledgeBoat Logo
|
LoginJOIN NOW

Computer Science

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

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

Python Modules

3 Likes

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.

Answered By

2 Likes


Related Questions