0

Can you explain me 9** (1/2)

2nd Apr 2020, 1:32 PM
Sai Teja
Sai Teja - avatar
2 Answers
+ 4
It's more of maths than programming. M raised to power of 1/n is equal to nth root of M. So 9**(1/2) is square root of 9.
2nd Apr 2020, 1:40 PM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 1
A little more detail: ** is the power operator in python and at least newest versions of js... In mathematical expressions, we have more commonly the habits to see the ^ sign for the power operator: (math context) x ^ y is equivalent to: (code context) x ** y ... and should be pronounced "x raised to the power of y"
2nd Apr 2020, 2:48 PM
visph
visph - avatar