Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to do square roots in python

# Method 1

from math import sqrt
root = sqrt(25)

# Method 2, more efficient in my opinion*
root = 25 ** (1/2) # If you did not learn this yet in math, by making a fraction to the power of the number, you repeat the multiplication by the numerator but find the root of the denominator in the exponent.
 
PREVIOUS NEXT
Tagged: #How #square #roots #python
ADD COMMENT
Topic
Name
5+5 =