Computer Science
What is the value of x, if x = math.factorial(0) ?
- 1
- 0
- Error
- 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
What will be the output on screen after executing: print(math.fabs(-6.4)) ?
- -6.4
- 6.4
- 4
- 6
If a, b, c = 3, 4, 1 then what will be the value of math.sqrt(b)*a-c?
- 5.0
- 5
- 2
- 4.0
What is the value of x, if x = math.sqrt(25.0) ?
- (5, -5)
- 5
- 5.0
- (5.0, -5.0)
What value will be returned, if x = math.floor(-24.6) ?
- 24.6
- -24
- -25
- -24.6