Draw horizontal and vertical lines on a picture where the gap between the lines increases linearly. Start at 10, then 12, then 14.
The important part here is to make sure the value you add on by is increasing by two every time.
```
def lineExample2 ():
img = makePicture(pickAFile()) verticalLines(img)
horizontalLines(img)
show(img)
return img
def horizontalLines(src):
increase = 0
multi = 0
for x in range(0,getHeight(src),2):
for y in range(0,getWidth(src)):
if x==increase:
setColor(getPixel(src,y,(x)),black)
if x==increase:
increase = increase+10+multi*2
multi = multi+1
def verticalLines(src):
increase = 0
multi = 0
for x in range(0,getWidth(src)):
for y in range(0,getHeight(src)):
if x==increase:
setColor(getPixel(src,(x),y),black)
if x==increase:
increase = increase+10+multi*2
multi = multi+1
```
You might also like to view...
If a system has an input power level of 9000, and an output power level of 3000, what is the difference when expressed in dB?
What will be an ideal response?
Critical Thinking QuestionsCase 8-1Because users interact with sites on a variety of user agents, you, as a Web site designer, need a way to determine some parameters of the device that your site will be viewed on or output to so that you can customize pages for display on or output to that device and create responsive sites. Which of the following do you know is the distance across the targeted display area, and optimally the minimum or maximum measurement?
A. width B. aspect-ratio C. x D. display-width
Define unconditional response (UR)
What will be an ideal response?
An important usability issue is helping users recover from __________________.
Fill in the blank(s) with the appropriate word(s).