Solutions to CodingBat Java/Python