# Square Root in Python

Python is one of the easy-to-learn programming languages not just because of its simple English syntax but also due to the presence of lots of libraries for different tasks. These are the reasons for Python being so popular among newbies.

Similarly, for doing mathematics tasks, Python has a built-in module called math that is used for doing lots of mathematical calculations in Python programming. See some of the methods of the math module in Python:

## Square Root in Python

In Python math module we have math.sqrt() method that returns the square root of a number provided the number must be greater than or equal to 0. If the number is less than 0, it returns a ValueError. If the value is not a number, it returns a TypeError.

Let’s find the Square root of 25 in Python:

``````import math
root = math.sqrt(25)
print(root)``````
Output: 5

As you can see in the above code, we first imported the math module in our Python file.

Let’s find some more square roots:

``````import math

print (math.sqrt(9))
print (math.sqrt(20))
print (math.sqrt(15.67))``````
Output: 3
4.47213595499958
3.9585350825778973