CBSE Class 11 Computer Science Question 25 of 63

Introduction to Python Modules — Question 6

Back to all questions
6
Question

Question 6

What value will be returned, if x = math.floor(-24.6) ?

  1. 24.6
  2. -24
  3. -25
  4. -24.6
Answer

-25

Reason — The math.floor() function returns the largest integer less than or equal to the given number. For math.floor(-24.6), the result is -25, which is the largest integer less than -24.6.