sqrt

math.sqrt() -> float

Returns the square root of x (math, numpy).

REMARKS
* math module
* Always returns a float, even when the input is an integer.
* You can use the math.isqrt function to

import math 
import numpy as np

print(math.sqrt(16)) #= 4.0
print(math.sqrt(9)) #= 3.0 (float)
print(math.sqrt(-9)) #= ValueType
print(math.sqrt('text')) #= TypeError

© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited Top