Write a function to pull out just Jenny’s eyes, rather than remove the red in them, and paste them into a canvas.

What will be an ideal response?


```
def copyEyes ():
# Set up the source and target pictures
src = makePicture("jenny-red.jpg")
canvas = makeEmptyPicture (getWidth(src) ,getHeight(src))
# Now , do the actual copying
for sourceX in range(0,getWidth(src)):
for sourceY in range(0,getHeight(src)):
if (sourceX>108) and (sourceX<(108+91)) and (sourceY>201) and (sourceY<(201+107)):
color = getColor(getPixel(src,sourceX,sourceY))
setColor(getPixel(canvas ,sourceX ,sourceY), color)
show(src)
show(canvas)
return canvas
```

Computer Science & Information Technology

You might also like to view...

Which of the following is a correct name for the function that calculates an average of values?

A. AVG B. AVERAGE C. MEAN D. AVGVAL

Computer Science & Information Technology

To correct a potential spelling, grammatical, or word usage error in a document, you ________ the underlined error and make a selection from the resulting menu

A) double-click B) click C) right-click D) triple-click

Computer Science & Information Technology

When viewing macro code, the character ________ indicates a comment line

A) : (colon) B) , (comma) C) . (period) D) ' (single quotation mark)

Computer Science & Information Technology

Which of the following DoD security ratings is given to systems with the highest level of security?

a. Category A b. Category B c. Category C d. Category D

Computer Science & Information Technology