By Hemanta Sundaray on 2021-09-10
First, import the math module near the top of the .py file or Jupyter cell to make the functions available to the rest of the code.
Returns the smallest integer greater than or equal to x.
import math
print(math.ceil(-3.4))
# -3
Returns the largest integer less than or equal to x.
import math
print(math.floor(-3.4))
# -4
Returns x raised to the power y.
import math
print(math.pow(3, 4))
# 81.0
Gets the square root of x.
import math
print(math.sqrt(81))
# 9.0