# How to get the square root of a number in Python:
# First we import the math module
import math
# Then we get the square root of a number using the sqrt() method
print(math.sqrt(9))
# Another way is to do it by doing this calculation: 'number ** 0.5'
print(9 ** 0.5)
how to find a square root of a number using python
import math
whose_square = int(input("Of which number to find square root:- "))
print("The square root of ", whose_square,"is",math.sqrt(whose_square))
# Method 1
from math import sqrt
root = sqrt(25)
# Method 2, more efficient in my opinion*
root = 25 ** (1/2) # If you did not learn this yet in math, by making a fraction to the power of the number, you repeat the multiplication by the numerator but find the root of the denominator in the exponent.
# python program to find the square root of the number
num = int(input("enter a number:"))
num_sqrt = num ** 0.5
print("the sqare root of {0} is {1}".format(num, num_sqrt))