← Questions

Mirror or blur a grayscale image

0
OpenAICodingLast asked Sep 2026

A grayscale image is a matrix of values 0 to 255. Given a filter code, return a new image: either mirror every row left to right, or blur it, replacing each pixel with the rounded average of its existing neighbours among the eight around it (keep the pixel when it has none). The blur must read only original values, never already-blurred ones.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding