+ 2

What is the difference between floor division operator and normal division operator?

27th Nov 2017, 1:40 AM
tom jerry
tom jerry - avatar
3 Answers
+ 10
normal division 5/2 =>2.5 floor division 5//2=>2
27th Nov 2017, 2:01 AM
Seetha
Seetha - avatar
+ 4
Normal division is basically... normal division. For example: print (31/4) #7.75 But floor division rounds down the answer to the nearest integer. For example, print(31//4) #7 (you throw away everything after the decimal point). Hope this helped. 😉
27th Nov 2017, 2:19 AM
blackcat1111
blackcat1111 - avatar
+ 1
Also, always gives a float for normal division. For example: 10/2 => 5.0 10//2 => 5
27th Nov 2017, 8:09 AM
Max S