The black in the function copyHorseFaceSmallBlack doesn’t look great on that horse. Would red look better? Try it.

What will be an ideal response?

```
def copyHorseFaceSmallRed ():
hcol = makeColor (216 ,169 ,143)
# Set up the source and target pictures
src = makePicture("horse.jpg")
canvas = makeEmptyPicture (163 ,308)
# Now , do the actual copying
targetX = 0
for sourceX in range(104,267):
targetY = 0
for sourceY in range (114 ,422):
color = getColor(getPixel(src,sourceX,sourceY))
if distance(color ,hcol) < 40:
setColor(getPixel(canvas ,targetX ,targetY), red)
else:
setColor(getPixel(canvas ,targetX ,targetY), color)
targetY = targetY + 1
targetX = targetX + 1
show(canvas)
return canvas
```

Computer Science & Information Technology

You might also like to view...

What are Text functions? How are they used for cleaning data?

What will be an ideal response?

Computer Science & Information Technology

Which of the following are among the 802.11 cryptography objectives? 

A. efficient B. self-synchronizing C. mandatory D. exclusive

Computer Science & Information Technology