Use loops to draw patterns