+ 1

Can someone help me explain because am really confused here.

When I print the exponential of 9 ** 1/2, I get 4.5 but when I print 9 ** 0.5 that's when I get 3.0 but in the python 3 course it's saying the exponential of 9 ** 1/2 is 3.0

3rd Oct 2019, 5:19 AM
de malong
de malong - avatar
5 Answers
+ 6
Order of operations will make: 9**1/2 Equivalent to: (9**1) / 2 Try: 9**(1/2)
3rd Oct 2019, 5:35 AM
David Carroll
David Carroll - avatar
+ 4
de malong Yep. This would apply in all programming languages, as well as, written math and standard calculators.
3rd Oct 2019, 5:42 AM
David Carroll
David Carroll - avatar
+ 3
This is a copy from the python tutorial: >>> 2**5 32 >>> 9 ** (1/2) 3.0
3rd Oct 2019, 6:07 AM
Lothar
Lothar - avatar
+ 2
Yeah that what I thought but the tutorials says otherwise https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2273/
3rd Oct 2019, 5:33 AM
de malong
de malong - avatar
+ 2
David Carroll thanks it work so basically we'd have to put brackets around 1/2
3rd Oct 2019, 5:37 AM
de malong
de malong - avatar