NCERT Computer Science Class #11 – Chapter #7 Solutions – Q #2

Chapter 7 – Functions

NCERT Computer Science Class #11 – Chapter #7 Solutions – Q #2

Classs #11 – Chapter #7 – Q #2:

How is math.ceil(89.7) different from math.floor (89.7)?



math.ceil(89.7): This function returns the smallest integer that is greater than or equal to 89.7. Therefore, the output is 90. It effectively rounds the number up to the nearest whole number

math.floor(89.7): Conversely, this function returns the largest integer that is less than or equal to 89.7. Hence, the output is 89. It rounds the number down to the nearest whole number

Summary:

FunctionInputOutput
math.ceil()89.790
math.floor()89.789

NCERT Computer Science Class 11 Chapter 7 Solutions Q 2

Posts created 29

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top