Find square root of a number using exponential operation

Hello everyone, welcome back! Here we learn about a python program which finds the square root of a given number. We find the square-root of a number using exponential operations.

Here I calculate the square-root by finding the power of the number with 0.5, as you all know that square-root of a number is equal to its power by half. So now I use this way to calculate the result.

One can also find the square-root of a number using a built-in function called sqrt(), Look at my other post here which shows the same.

You can watch this video on youtube here

Program on Github

Square Root – Code Visualization

Task :

To find the square-root of a given number

Approach :

  • Read input number for which the square root is to be calculated using input() orraw_input().
  • Use exponential operation ** to that number with 0.5
  • The obtained result of the above operation is required square-root.
  • Print the result.

Program on Github

Program :

Output :

square root of a given number - programminginpython.comSquareRoot of a given number – programminginpython.com

square root of a given number - programminginpython.comSquareRoot of a given number – programminginpython.com

square root of a given number - programminginpython.comSquareRoot of a given number – programminginpython.com

Program on Github

Leave a Reply