+ 3

What is difference between floor division operator (//) and normal division operator (/)??

they both return the quationt . Then whts the difference jst tht normal division returns it in decimal format.

9th Sep 2017, 2:17 PM
Zaheer Ahamad
Zaheer Ahamad - avatar
3 Answers
+ 3
5/2=2.5 5//2=2 ( only integer part..excluding remainder )
9th Sep 2017, 2:51 PM
sayan chandra
sayan chandra - avatar
+ 1
u can say..... int(a/b)=a//b.... more logically
9th Sep 2017, 2:53 PM
sayan chandra
sayan chandra - avatar
0
Pyton. // Floor division operand is very simple with positive digit. But don't mistake with negative digits! 9//4=2 11//3=3 -11//3=-4 10//3=3 -10//3=-4 10//-3=-4 9.01//3=3.0 9.01//-3=-4 9.01/3=3.00333333333334
28th Nov 2017, 3:39 PM
Jamol Makhsudov
Jamol Makhsudov - avatar