Write a function that will scale up just part of the picture. Try making someone’s nose longer.

What will be an ideal response?

```
def noseLongerifier (scr, x, y, w, h):
canvas = makeEmptyPicture(getWidth(scr), getHeight(scr))
for i in range(0, getWidth(scr)):
for j in range(0, getHeight(scr)):
p = getPixel(canvas, i, j)
p2 = getPixel(scr, i, j)
color = getColor(p2)
setColor(p, color)

sourceX = 0.0
for targetX in range(x,x+w*2):
sourceY = 0.0
for targetY in range(y,y+h):
px = getPixel(scr,int(sourceX),int(sourceY))
color = getColor(px)
setColor(getPixel(canvas ,int(targetX) ,int(targetY)), color)
sourceY = sourceY + 1
sourceX = sourceX + 0.5
show(canvas)
return canvas
```

Note: This function doubles the width of a past in area, so can be used to lengthen a nose.

Computer Science & Information Technology

You might also like to view...

A good search tool to use when writing a research paper is Google ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

A high speed Internet connection operating at speeds of 256 kbps is called:

A) Dial-up access B) Broadband connection C) Internet Connection Sharing D) Remote Desktop Communication

Computer Science & Information Technology