+ 1
Could any one explain clearly
Print(9**(1/2)) answer is 3.0 how?
5 Réponses
+ 5
In python if you operate mathematical operation with a float type, your output will also be a float.
So, 9**(1/2)
→ 9 ** 0.5 (parenthesis first)
→ 3.0 (not 3 bcz the power is a float)
+ 5
It's Me It's Mathematics at work :)
x**(y/z) equals (x**y)**1/z
And **1/z is actually the z-root of the number.
So:
9**(1/2) == ²√9¹ = ²√9 = 3.0
8**(2/3) == ³√8² = ³√64 = 4.0
and so on.
+ 4
[Edited]:
9**(1/2) => 9**(0.5) => 3.0
Taking a number to the power of 0.5 is the same as if you calculate the square root of that number. You can try it in the console or in a short script.
+ 4
It's Me u can write 0.5 like this 1/2 . 1/2==0.5 and root √ value is equal to 1/2 then we can write 9 as 3 to the power 2 means (3^2) and 9**(1/2) =3^2*1/2 =3.0
+ 1
9**0.5 = 3.0 how?