Basic positive decimal
Input
round_up_down(3.2)
Output
(4, 3)
Ceiling of 3.2 is 4, floor is 3.
Full lesson preview
Use the math module to find the ceiling and floor of a number. Learn to convert floats to their nearest integers upwards and downwards.
Problem statement
Task
Examples
Input
round_up_down(3.2)
Output
(4, 3)
Ceiling of 3.2 is 4, floor is 3.
Input format
Output format
Constraints
Samples
Input
round_up_down(-1.7)
Output
(-1, -2)
Ceiling of -1.7 is -1 (less negative), floor is -2 (more negative).