+ 1

How <<<20//6 is 3

7th Oct 2017, 6:46 AM
saumyaranjan behera
saumyaranjan behera - avatar
2 Respuestas
+ 5
divide with integer result (discard remainder). Together with this operator, you can say that a == (a // b)*b + (a % b). 
7th Oct 2017, 7:01 AM
arashi80
arashi80 - avatar
+ 5
20//6 = 3 as 6 is going in to 20 three times no matter there is remainder. Another example would be 20//5. This is going to return 4 as 5 is going in to 20 four times, in this case notting left. Another example would be 27//7. This is going to return 3 no matter there is remainder of 6. This is how floor division works.
7th Oct 2017, 7:13 AM
Leno
Leno - avatar