CS 110: Class Work Help

Posted: April 17, 2015

When working on the course work assigned yesterday (based of Wednesday's lesson on looping) you need to know how to tell if a number is even or odd.  Use the "mod" function.  Remember the "mod" function returns the remainder of a division.  For example, 19 mod 3 evaluates to 1 (19 divided by 3 is 6 remainder 1).  If a number is even it will have a remainder of 0 when divided by 2.