2.
The modulo operation returns the remainder after division. Two divided by ten gives zero with two left over, so 2 mod 10 is 2. Any number smaller than the divisor is its own remainder, which is why 2 mod 10 and 2 mod 500 both equal 2.