The sqrt() function - Python math module

The sqrt() function in Python returns the square root of a specified number. Square root when multiplied by itself will give the original number.

Math Updated 25 Sep 2016 1 min read

Function name

sqrt(aNumber_in)

Parameters

aNumber_in - The number for which the square root is to be found.

Return value

The square root of the number specified by the parameter aNumber_in.

Overview

The sqrt() method in Python math module, returns the square root of a number.
The square root returned produces the original number when multiplied by itself.

python
import math

# Find square root of pi (π)

squareRootOfPi = math.sqrt(math.pi)

print("Square root of Pi(π):{}".format(squareRootOfPi))

# Find square root of boltzmann constant

boltzmannConstant_SqRoot = 1.38064852*pow(10,-23)

print("Square root of Boltzmann constant:{}".format(math.sqrt(boltzmannConstant_SqRoot)))

Output

Output
Square root of Pi(π):1.7724538509055159

Square root of Boltzmann constant:3.715707900252655e-12