Jason R Briggs

Python for Kids

Puzzle Number 8

Posted, 28 Oct 2013

Difficulty: medium

In the previous puzzle, we created a simple drawing program. When you click on the canvas and drag the mouse the program draws a line.

This time, we'll take our drawing program and change it so that it first draws a line, but if you press any key it starts to erase. When you hit a key again, it draws again (and so on)

Hint: you might find the binding "<Key>" useful in your program.


Check back in a few weeks for the solution.