- 1

How do you calculate square root in Python?

What are the technique(s) on how you would structure the formula of square root in python syntax?

12th Oct 2021, 1:43 AM
Elliott Norris
3 ответов
+ 3
print(num **0.5) or print(num**(1/2))
12th Oct 2021, 1:51 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Hello, python has a math module. Its called “math”, all you have to do is call import math, then for whatever variable you want, you call math.sqrt(x)
12th Oct 2021, 1:47 AM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
+ 2
You can use ** operator or import the module math and use sqrt()
12th Oct 2021, 5:39 AM
SIDDHARTH A
SIDDHARTH A - avatar