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...

An arbitrary byte sequence chosen by the server to identify an active or resumable session state is a _________ .

A) ?peer certificate ? B) ?session identifier C) ?compression ? D) ?cipher spec

Computer Science & Information Technology

________ are the two characters that Web programmers use to terminate HTML tags

Fill in the blank(s) with correct word

Computer Science & Information Technology

The VTP ____ option reduces the number of VTP updates that traverse a link.

A. transparent B. client C. server D. pruning

Computer Science & Information Technology

Programs installed on a tablet are called mobile apps

Indicate whether the statement is true or false

Computer Science & Information Technology