Math Module Practice
Use Python's built-in math module to find the floor, ceiling, and square root of a number.
What the problem means: the math module (part of the Standard Library, no installation needed) provides ready-made functions for exactly this kind of calculation instead of you writing the logic yourself.
Approach: import math, then use math.floor(), math.ceil(), and math.sqrt() on the given number.
Input: One line: a number (may include a decimal point).
Output: Three lines: Floor: <value> Ceiling: <value> Square Root: <value, 2 decimal places>
4.7
Floor: 4 Ceiling: 5 Square Root: 2.17
- 0 <= n <= 10^6
Hint 1
math.floor(x) rounds down; math.ceil(x) rounds up.
Hint 2
math.sqrt(x) computes the square root.
Hint 3
Format the square root with :.2f so it always shows exactly 2 decimal places.
Import the math module once at the top, then call math.floor(x), math.ceil(x) and math.sqrt(x) directly — no need to implement any of this rounding/root logic by hand. Format the square root to 2 decimal places with an f-string.