CBSE Class 11 Computer Science Question 3 of 63

Introduction to Python Modules — Question 3

Back to all questions
3
Question

Question 3

Assertion (A): The function ceil() is a commonly used function from math module.

Reasoning (R): The ceil() function takes a numeric argument and returns the smallest integer that is greater than or equal to the argument.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
The function ceil() is a commonly used function from math module. The ceil() function takes a numeric argument and returns the closest integer that is greater than or equal to the argument. The syntax is math.ceil(x).