Now, we are going to learn about the Python Math Sqrt method. As the name of the method suggests, the sqrt method is going to return the square root value for the given argument. So, whenever we are required to get the square root of some number, we can make use of the sqrt method.
Let’s have a look at a simple program, which tries to demonstrate the sqrt method.
Python Math Sqrt
As you can see in the above program, we imported the math module, then we are calling the sqrt method, and we passed the number as an argument. As a return value from the sqrt method, we get the square root of the given number. If you try to run the above program, we get the output as 4.0. We are directly printing the return value, but you can store the value for future access.
So, as and when required, we can make use of the sqrt method in our program. Remember that the sqrt method returns the square root of the given argument.