How to calculate square root of a number in Python?

PythonServer Side ProgrammingProgramming

using the sqrt() function defined in math module of Python library is the easiest way to calculate square root of a number

>>> import math
>>> math.sqrt(10)
3.1622776601683795
>>> math.sqrt(3)
1.7320508075688772
raja
Updated on 02-Mar-2020 10:11:29

Advertisements