Python sqrt function

Python sqrt() function calculates the square root of x (x > 0). It's a method of math module.

>>> import math
>>> math.sqrt(0)
0.0
>>> math.sqrt(9)
3.0
>>> math.sqrt(100)
10.0
















endmemo.com © 2024  | Terms of Use | Privacy | Home