Sqrt function - python math module

method name:

sqrt(aNumber_in)

method 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.

parameters:

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

Return value:

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

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:

Square root of Pi(π):1.7724538509055159

Square root of Boltzmann constant:3.715707900252655e-12


Copyright 2024 © pythontic.com