+ 2
What is the difference between division (/) and floor division (//) ?
9 Respostas
+ 10
5/2 = 2.5
5//2 = 2
+ 3
Mohamed is right. Even if result is 2.99, output will be considered as 2 only
+ 2
i dont know if i say the right answer but i think floor division just keep the number without any decimal
+ 2
what everyone said is wrong ..
/ division gives the answer to a division between two numbers so 20/8=2.5 for example
a//b tells you how many times you can devide a by b. 20//8
how many time can you divide 20 by 8? 2 times
2×8=16.. that's the difference
+ 1
Floor division rounds the result down to a full number, so yes, 2.5 becomes 2
+ 1
yes. its right. but the result is same. i said your answer with different language. the result is important. both two answers are equal
0
So... if i get it right, (11//2=5) because i can divide 5 times 11 by 2 but ... now where'is the rest?
0
Adrian, there is no more. In that operation the remainder is discarded. So 20//8 is 2 and the remainder of .5 would be dropped in this operation. It only uses the number of times yoo can divide by a whole number evenly
0
to get the rest there is another symbol, the percentage % to get the remainder of a number divided by another