What does this mean //? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What does this mean //?

python

30th Jul 2017, 11:03 AM
Ergest Zykollari
Ergest Zykollari - avatar
5 Answers
+ 19
difference BTW / and // 1. 7/2=3.5 (returns floating point) 2. 7//2=3 (returns whole number i.e integer)
30th Jul 2017, 11:48 AM
Ant●ny
+ 9
To be technically correct this returns an integer *next lowest* to the division result. This is important to understand why it behaves a little weird for negative numbers: 34 // 7 == 4 34 // -7 == -5 -34 // 7 == -5 -34 // -7 == 4
30th Jul 2017, 12:49 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 6
It is floor division ,in python And satisfied by Vukasin...😊😊😊😊👏👍
30th Jul 2017, 11:43 AM
💞ⓢⓦⓐⓣⓘ💞
💞ⓢⓦⓐⓣⓘ💞 - avatar
+ 3
It stands for floor division, it returns the greatest divisor of an integer. For instance print(34//6) The output will be 5, because 6*5=30, and it will remove the remainder, which is 4.
30th Jul 2017, 11:15 AM
Vukašin Zeljić
Vukašin Zeljić - avatar
+ 1
the // means a number without a decimal place at the end
31st Jul 2017, 7:52 AM
Fred Ndegwa
Fred Ndegwa - avatar