**New course!**Every coder should learn

**Generative AI!**

+ 2

# Please explain 20 // 6

17 Answers

+ 3

// is a floor division operator
Remove the digits after the decimal points after division
20/6 = 3.333...
20//6 = 3

+ 3

// is floor divion
It return quotient of Division.
Here 20//6
6 will be 3 times in 20. So output will be 3.
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2273/?ref=app

+ 3

Floor division is like integer division.

+ 2

@Vadivelan
It redirects me to https://www.sololearn.com/pagenotfound

+ 2

Sunad Magdum
You get it automatically if you do it by program...
It is Integer equalent of total result (of 3.3333 => 3).
It gives dividend, to get reminder use % operator.
20 // 6 = 3 because 3*6=18, =>Floor or Integer division.
20 / 6 = 3.33333.... => decimal division
20 % 6 = 2. Because 3*6=18, & 20-18 =2 =>modular division
Erich Buelow
may you not completed that lesson so you can't see.. I think the questioner also can't see so that's why I added explanation....

+ 2

It is equivalent to rounded integer division using floor and ceil functions 🤖

+ 2

You are asking for only the whole number in the result
so the ans is 3
instaed of 3.3333

+ 1

Result is :
how many times 20 is divided by 6. = 3
Trunkates reminder..
Basic math 20 by 6
// Floor (Integer) division operator in python *....

+ 1

It is not enough to just remove the digits after the decimal point after division by the way.
I have written an in-depth explanation of floor division in my linked code using that example.
https://code.sololearn.com/cV9AXDn5asB5/?ref=app

+ 1

// is a floor division operator so: 20/6 = 3.333...
While:
20//6=3
See! It rounds off to the bottom(floor)! So, it removes the decimal!

+ 1

Compare
20 // 6 = 3
3 * 6 = 18
20 - 18 = 2
20 % 6 = 2
2 / 6 = 0.333333333
20 / 6 = 3.333333

+ 1

It just mean to return the remainder after 20 has been divided by 6
Which then in this case would be "2"

0

Erich Buelow How many digits I have to remove??

0

♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ Plz explain 20 % 6

0

floor division only get int values

0

/ - refers to actual division.
Eg - 20/6 = 3.3333(quotient)
Answer here is: 3.3333
where as,
// - refers to floor division.
Eg - 20/6 = 3(quotient)
Answer here is: 3

- 1

Explain 20%6