1.

Differentiate between the round() and floor() functions with the help of suitable example.

Answer»

The function round() is used to convert a fractional number into whole as the nearest next whereas the function floor() is used convert to the nearest lower whole number, 

e.g., round (5.8) = 6, round (4.1) = 5 and floor (6.9) = 6, floor (5.01) = 5



Discussion

No Comment Found