1. This is a common programming trick. Often you need to know the oddness and eveness of an integer.
The remainder operator can be used with negative integers. The rule is:
For example:
17 % 3 == 2 -17 % 3 == -2 17 % -3 == 2 -17 % -3 == -2
You may wish to practice with the following:
Does the value for π (pi) ever change?