Write a function to mirror the input picture’s leftmost 20 pixels to pixels 20 to 40.
What will be an ideal response?
```
def copyOverTwenty (src):
w = getWidth(src)
h = getHeight(src)
for x in range(0, 20):
for y in range(0,h):
p = getPixel(src, 40-x, y)
p2 = getPixel(src, x, y)
color = getColor(p2)
setColor(p, color)
```
Note: This question is very similar to many we have done before, the key is which pixels it writes to and from. In particular, the range for the first for loop and the line “p = getPixel(src, 40-i, j)”.
You might also like to view...
In ____-driven development, a programmer builds a test method first, before building a method for the program.
A. test B. method C. class D. function
When using the Draw Borders feature, you can merge cells by using the ________ to delete existing cell borders
Fill in the blank(s) with correct word
Increasing the exposure to darken areas on a print is called ____.
a. scaling b. dodging c. sharpening d. burning
Pressing [tab] after typing text in a cell accepts your entry and activates the next cell in the column.
Answer the following statement true (T) or false (F)