Write a function that inputs a picture, a color, and a number. The number is the width of a border that you are to draw on all four sides of the picture, with the given color. You can assume that the number will always be an integer less than 50.

What will be an ideal response?

```
def makeBorder(picture, border, number):
width = getWidth(picture)
height = getHeight(picture)

for p in getPixels(picture):
x = getX(p)
y = getY(p)

if x setColor(p, border)
elif x>(width-number-1):
setColor(p, border)

if y setColor(p, border)
elif y>(height-number-1):
setColor(p, border)
```

Note: To achieve the desired effect one has to use “height-number-1” or “width-number1” instead of “height-1” and “width-1” or the border will not be the correct size.

Computer Science & Information Technology

You might also like to view...

What is the component of IPSec that handles key generation and distribution?

A. IP Compression B. Encapsulating Security Payload C. Internet Key Exchange D. Authentication Header

Computer Science & Information Technology

How is the address 127.0.0.1 listed in the HOSTS file?

A. loopback B. localhost C. root D. gateway

Computer Science & Information Technology