0
20 // 6 = 3? Help me please
5 Respuestas
+ 2
20 // 6 , it mean the result of 20/6 without remainder
20 can be divide by 6 = 3 time , and the remainder is 2
So the result of 20//6 = 3
+ 2
// is the floor division operator.
in the example above it means 6 goes 3 times in 20.
If you want to know the remainder, just use the modulo operator %
0
مرحبا
- 1
In Python, // stands for integer division, so the fractional part just gets dropped. To truly divide, use 20 / 6 in py3 or 20 / 6.0 in py2.
- 1
thanks