# How to Calculate a Square Root in Python

The square root of a number is a number that gives the original number when squared. The square root of 9 is 3 because 3x3 = 9.

In Python we can calculate the square root of a number using the power operator, which is `**` (two asterisks.)

To use it, place the original number to the left of the power operator, raise the value to the power of 0.5 and store the result in a variable. Here is an example of getting the square root of 16:

``````original = 16

squ_root = original ** 0.5

print(squ_root)
``````
``````4.0
``````

## Get Square Root with the Python math Package

For a cleaner syntax, you can use the `.sqrt()` function from the Python `math` package.

``````import math

original = 23

squ_root = math.sqrt(original)

print(squ_root)
``````
``````4.795831523312719
``````

June 30, 2021

October 07, 2020

### How to Create and Use Lists (Arrays) in Python

September 01, 2020

May 28, 2021

### How to Use Dictionaries In Python

September 08, 2020

October 01, 2021