How does a modulo operator works, exactly
I wanted to get a remainder from division of 1 by 3, which resulted in 1. But how was it calculated?
I looked up a general formula n = kd + r, r < d
E.g., 8%3 in Python would result in 2, since 8 = (2 * 3) + 2, where r = 2. I can substitute numbers in that case, but I can’t work them out for 1 and 3.