Latest
Home » Find square root of a number using exponential operation

# Find square root of a number using exponential operation Hello everyone, welcome back to Programming In Python! Here we learn about a Python program that 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 the 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.

### July Promo - Limited Time Sale Limited time sale - 50% OFF Learn in-demand data and AI skills on the 17th of July

You can watch this video on YouTube here

### July Promo - Limited Time Sale Limited time sale - 50% OFF Learn in-demand data and AI skills on the 17th of July

To find the square root using exponential operation

#### Approach :

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

#### Program :

```num = float(input('Enter a number: '))

sqrt = num ** 0.5
print('The square root of %0.3f is %0.3f' % (num, sqrt))```