What's the command for square roots in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the command for square roots in python?

15th Mar 2022, 10:59 AM
Gonçalo Vicente
3 Answers
+ 4
x**(1/2) or x**0.5 9**(1/2) = 3.0
15th Mar 2022, 11:03 AM
Simba
Simba - avatar
+ 4
Or alternatively sqrt() from math module. Try to google "Python square root" to find out about it yourself.
15th Mar 2022, 11:05 AM
Lisa
Lisa - avatar
+ 3
Just use sqrt() as Lisa has stated I think it is very easy there are also alternative functions in numpy but I dont prefer
15th Mar 2022, 11:19 AM
Meshack