0
In the example 2 ** 5=32 and 9 ** (1/2)=3.0
Why in the first example python returns only integer(32) and in the 2nd example returns float (3.0)??
1 Odpowiedź
+ 7
Because 1/2 is basically converted to 0.5 which is a float. Hence, the answer is second case is a float as a float is involved while in first case, only integers are involved. Thus, answer is in integer only.