In python. print ( 9 * * ( 1/ 2 ) ) = 3.0
Can anyone explain or iterate this... Please
Chandana M You used back slash instead of divisor operator print (9**(1/2)) Will give 3.0 as output
'**' is the exponentiation operator 9**(1/2) is basically the square root of 9 Since 1/2=0.5, 9**0.5=3.0 (since exponent is a float, the output is a float)
The correct syntax would be: print(9 ** (1/2)) Here, the ** operator is used to calculate the power of a number. In this case, the number 9 is being raised to the power of 1/2, which is the same as taking the square root of 9. The print() function is then used to print the result to the screen. The result of this code would be 3.0, which is the square root of 9. I hope this helps! Let me know if you have any other questions.
Okay Ria... But I want how it gonna work
here ** means, power of or exponent And **1/2 means,root over so,√9 os 3