What does this mean 20//6 | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

What does this mean 20//6

4th Nov 2016, 6:21 PM
Armaan Narang
Armaan Narang - avatar
5 Respuestas
+ 4
It's the ammount of times 20 can be divided by 6. the output is 3. This operator is called floor division. Think of it like normal division but here the decimal points are removed. Example 5//4 = 1 9//2 = 4 10//2.6 = 3.0
4th Nov 2016, 6:31 PM
Harry Pearson
Harry Pearson - avatar
0
thanks dude it really helped can u send me ur whatsapp no.?
4th Nov 2016, 6:36 PM
Armaan Narang
Armaan Narang - avatar
0
on normal basics 20 divide by 3 is 3.33333 which is 20 / 3 but in d aspect of 20 // 3 d answer is just 3 because it does not show the remainder
6th Nov 2016, 3:51 PM
Oniovosa Hope
Oniovosa Hope - avatar
0
a//b means integer division of a by b and the operation occur for only one time for example 20//5 will be 4 m i right ? or it will perform operation for twice ? whats the correct thing??
20th Nov 2016, 5:16 AM
arpit
arpit - avatar
0
it is for floor.. means that when dividing 20/6 we got a float value.. to eliminate the decimal part use double / for floor the value... 20//6 get 3..
21st Nov 2016, 3:04 PM
Ajith Lal
Ajith Lal - avatar