Write a function that uses the same process to draw a vertical line down the middle of the picture, and a horizontal line across the middle of the picture, neatly separating the picture into four quadrants. This function can work for any square or rectangular picture.

What will be an ideal response?

```
def drawQuadrants(picture, lineColor):
vertical = getWidth(picture)/2
horizontal = getHeight(picture)/2
for p in getPixels(picture):
x = getX(p)
y = getY(p)

if y==vertical:
setColor(p,lineColor)
if x==horizontal:
setColor(p,lineColor)
```

Note: The question does not specify that a line color should be passed in, so one can just write a function that always uses the same color.

Computer Science & Information Technology

You might also like to view...

A _________ is an encryption/decryption scheme in which a block of plaintext is treated as a whole and used to produce a ciphertext block of equal length. ?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A(n) ______________ imports all static members of a class.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology