< Back

Test 2 Coding

This is a closed book, closed note, closed files test. You are allowed to access only the files related to your program you are writing here. You are allowed the front half of a standard 8 1/2 x 11 sheet of paper of handwritten notes.

When you are done, submit your file on inquire.


Checkers

A stereotypical checkerboard contains alternating squares of red and black. However, a typical chess board contains alternating squares of white and black.

In a file called checkers.py, write a function called checkers_to_chess(a_picture). This function should replace all red pixels with white pixels.

(16 points)