Golfing Task #2 - Water Hazards

Feel free to discuss more advanced techniques and code ideas here, including how to do Task #2 with as few lines of code as possible.