How to find square root in python?
![](https://pythonpoint.net/wp-content/uploads/2020/11/hus-1-1024x576.jpg)
Python has a wide variety of libraries or packages which helps us in many ways.
For finding a square root of a number we have a library named as math. We can easily import it.
Math library has a function sqrt() which helps to find square root of any number.
e.g.,
import math print(math.sqrt(16))
![](https://pythonpoint.net/wp-content/uploads/2020/11/Screenshot-750-1024x359.png)
We can find the square root of those number which is not a perfect square by this function.
e.g.,
import math a=22 print(math.sqrt(a))
![](https://pythonpoint.net/wp-content/uploads/2020/11/Screenshot-751-1024x333.png)
In this way we can find the square root of any number.
Subscribe
Login
Please login to comment
0 Discussion