Panhary H.

asked • 03/07/23

Problem C. Mirror

Problem C. Mirror

Next, you will be implementing the mirror function. This overwrites the right half of the image with a mirror image of the left (so within each list of lists representing a row of pixels, the pixels in the second half of the row are overwritten by a mirror image of the pixels in the first half). If there are an odd number of columns, the middle column remains unchanged.


Examples:

>>> mirror([[[127, 127, 127], [0, 0, 0]],

[[255, 255, 0], [50, 128, 255]],

[[0, 0, 255], [0, 255, 0]],

[[255, 0, 0], [255, 255, 255]]])


[[[127, 127, 127], [127, 127, 127]],

[[255, 255, 0], [255, 255, 0]],

[[0, 0, 255], [0, 0, 255]],

[[255, 0, 0], [255, 0, 0]]]


1 Expert Answer

By:

White A. answered • 03/08/23

Tutor
New to Wyzant

experienced csa tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.