Please explain about floor division?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Please explain about floor division??

28th May 2017, 5:07 AM
Ajay J
Ajay J - avatar
4 Answers
+ 8
Floor division returns the quotient of division operation. Example : If 5 is divided by 2, 2 is quotient and 1 is remainder. So, 5 // 2 is 2.
28th May 2017, 5:13 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 3
28th May 2017, 7:00 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
It provides an integer answer, in technical terms, it does just as Krishna said. A good way to think of it is asking the question: How many times can you fit this number under another? Example: 20 // 7 7 fits into 20, 2 times. 7, 14
28th May 2017, 5:42 AM
Sapphire
- 1
what is the answer for 5/2 and 5//2?
28th May 2017, 5:16 AM
Ajay J
Ajay J - avatar