Learn how to implement and use the floodfill algorithm in Python.
The only way to learn mathematics is to do mathematics.