3 ms·
The // division is like the mathematical division where the remainder is positive (a = qd + r and 0 ≤ r < |d|). If -2 // 3 would give you 0, it means the remain
by ciupicri 10y ago
The // division is like the mathematical division where the remainder is positive (a = qd + r and 0 ≤ r < |d|). If -2 // 3 would give you 0, it means the remainder is -2 which is a no-no. If -2 // 3 gives you -1, the remainder is 1 which is fine.