exponentiation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

exponentiation

Why in Python 3.7 when I write 9 ** (1/2) I get 3. But when I code 9 ** (0.5) I get 18?

14th Jul 2018, 4:12 PM
Ivan Nepomnyashchikh
Ivan Nepomnyashchikh - avatar
1 Answer
0
I get 3.0 in both cases. Could you show your code please?
14th Jul 2018, 4:28 PM
Matthias
Matthias - avatar