You use the `% 2 != 0` check twice. Is there a DRYer way to write this code?

Also, look at [Integer#odd?](http://www.ruby-doc.org/core-2.0/Integer.html#method-i-odd-3F).