Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Get the square root of a number in Python

# 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)
 
PREVIOUS NEXT
Tagged: #Get #square #root #number #Python
ADD COMMENT
Topic
Name
4+6 =