+ 1

How i can do the root square in Python?

27th Apr 2022, 11:03 AM
Gatete21
Gatete21 - avatar
4 ответов
+ 5
print(4**0.5)
27th Apr 2022, 11:23 AM
Paul
Paul - avatar
+ 2
Or alternatively: from math import sqrt print(sqrt(4)) Also see lesson 5 of the Python for Beginners course.
27th Apr 2022, 11:30 AM
Lisa
Lisa - avatar
+ 1
You can use powering half. X**2 means x*x X**(1/2) means root x So write x**0.5 to keep it simple.
28th Apr 2022, 7:32 PM
PRAKASH KUMAR
PRAKASH KUMAR - avatar
0
Paul you know what! I never thought of that!
28th Apr 2022, 5:32 AM
FeDi BbM
FeDi BbM - avatar