What is floor division? And what is the difference in the functioning of a / and a //...i didnt quiet understand it | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is floor division? And what is the difference in the functioning of a / and a //...i didnt quiet understand it

14th Apr 2018, 3:09 PM
Prachi Pandit
4 Answers
0
Normal division (/) returns a float 5 / 2 will return 2.5 Floor division (//) returns an integer 5 // 2 will return 2
14th Apr 2018, 3:12 PM
TurtleShell
TurtleShell - avatar
0
so it will basically return the integer part of a quotient ?
14th Apr 2018, 3:13 PM
Prachi Pandit
0
Yeah
14th Apr 2018, 3:14 PM
TurtleShell
TurtleShell - avatar
0
thank you so much!
14th Apr 2018, 3:14 PM
Prachi Pandit