CBSE Class 11 Computer Science
Question 8 of 63
Introduction to Python Modules — Question 8
Back to all questions 8
Question Assertion (A): The output of print(math.factorial(4.5)) shall generate an error.
Reasoning (R): This factorial() function belongs to the statistics module in Python.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
A is true but R is false.
Explanation
The math.factorial() function in Python requires an integer argument, so using 4.5 as an argument will generate an error. The factorial() function belongs to the math module.