+ 1
What dose two / mean oike i know what this means / but this //?
2 Answers
+ 9
/ is a float division operator and always returns a float number
// is a floor division operator and returns an integer (or float if ANY of the numbers is a float) being the next lowest number than the result would be in a float division
Carrying on from the previous comment:
5 / 2 = 2.5
5 // 2 = 2
5 / (-2) = -2.5
5 // (-2) = ... -3 (because it is the next lowest of -2.5)
+ 8
5/2 = 2.5 (with .5)
5//2 = 2 (without .5)