Welcome folks today in this post we will be finding square root
of number in python. All the full source code of the application will be given below.
Get Started
In order to get started you need to make an app.py
file inside the root directory and copy paste the following code to it
app.py
1 2 3 4 5 6 7 8 9 10 |
# Python Program to calculate the square root # Note: change this value for a different result num = int(input("Enter the Input Number")) # To take the input from the user #num = float(input('Enter a number: ')) num_sqrt = num ** 0.5 print('The square root of %0.3f is %0.3f'%(num ,num_sqrt)) |
Here in the above script we are taking the number as input
and then calculating the square root
as shown below
python app.py
So 64
square root is 8