Home >>Python math Module >Python math.isqrt() Method
Python math.isqrt() method is used to round a square root number downwards to the nearest integer. The given input number must be greater than or equal to 0.
Syntax:math.isqrt(x)
Parameter | Description |
---|---|
x | This is a required parameter. It defines a number to round the square root of. |
import math
# The square root of different numbers
print (math.sqrt(10))
print (math.sqrt (12))
print (math.sqrt (68))
print (math.sqrt (100))
# Round square root to the nearest integer
print (math.isqrt(10))
print (math.isqrt (12))
print (math.isqrt (68))
print (math.isqrt (100))