>>> 17 // 10
1
The following is a bit tricky but its understandable as long as we remember that python will take the floor of the result of the integer division
Sometimes best explained by looking at the mathematical relationship:
For any two non-zero numbers a and b:
(b * (a // b) + a % b) is equal to a
And memorizing the rule that “When using modulo, the sign of the result matches the sign of the divisor (the second operand)”.
Hope that helps. I’ve had to put it on flashcards and now it’s ‘up there’ to stay, I hope.