0
Why does 9**(1/2) produce float and 8**2 doesn't? Please explain.
Hi, I am new to Python and am getting confused in why one expression produces integer while other produces float? Please explain.
1 Answer
+ 1
9**(1/2) means 9**0.5 float calculation
8**2 => 8*8 integer calculation
automatically upcasted to higher types