+ 1
Why the results are different? (floor division)
Why they are not the outputs 3 and -3 or 4 and -4? print (-11//3) # output -4 print (11//3) # output 3
1 Resposta
+ 11
Floor division works this way - it does not round to zero. Rather, it always returns the next lower integer, whether positive or negative.