Example 2: Drawing and Erasing Lines in a Loop.