CodingBat Warmup2 solutions