+ 1

>>>20//6

what is this can u please teach me

5th Mar 2018, 1:28 PM
Shyam Stha
Shyam Stha - avatar
6 Answers
+ 9
It's division(floor) operator. It rounds off the value to the nearest whole number. 20//6 = 3.333... Now 3.333... rounds off to 3, so 3 is the answer.
5th Mar 2018, 1:46 PM
Harsh
Harsh - avatar
+ 1
// = ONLY gives you NUMBER OF TIMES and ignores remainder. Example: print(20//6) = 3 22//4 = 5 31//7 = 4 31//8 = 3
5th Mar 2018, 2:32 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
+ 1
@ steller fox.. // operator doesnt round of to nearest integer value... it gives just the int value.. if it did rounded of..then 23//6 would be 4(cause..3.83 is closer to 4) but it gives 3 anyway.. ✌✌✌✌
5th Mar 2018, 4:08 PM
sayan chandra
sayan chandra - avatar
+ 1
but where did the reminder of 1.25 came from instead of 2
8th Mar 2018, 2:05 PM
Mubanga Peter
0
a//b=int(a/b)...
5th Mar 2018, 4:05 PM
sayan chandra
sayan chandra - avatar
0
@Mubanga Peter, 1.25 % .5 = .25 is remainder not quotient. 1.25 / .5 = 2, here 2 is quotient.
8th Mar 2018, 2:25 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar