As you know, programming has quickly become one of my favorite classes to teach. This year I’m reusing many of my materials from last year, so I actually have the time and mental space to fix things, change assignments, and tackle more intense projects. One of those projects is teaching the students some basic graphics with the Zelle textbook’s package. Last year we just used Turtle, so this year I had to tinker around with to get to work.

As with everything in teaching (and ESPECIALLY in teaching programming), it took a few tries to get it right, so I’ll share my findings with you here:

1. Use Pygame in

Though the package from Zelle is built on Tkinter (old schoooollll), it actually won’t work if you choose the “Tkinter” Python option on It also won’t work if you choose “Python with Turtle.” Instead, you need to use the “Pygame” option.

Notice “Python3 with Pygame” in the top right corner.

Using this correct version, when students run their graphics visualizations their creations will appear in the top right of the screen.

2. Teach your students to “fork” your code

“Fork” is a funny name for it, but in programming this is just creating your own copy of someone else’s code. This can be a dangerous thing to teach students because it shows them just how easy it is to commit coding plagiarism, but because my students are beginners and I want them to focus on graphics and not the messy behind-the-scenes file usage, I created a template code for them (with Zelle’s package already attached) which they then “forked.”

After they fork your code, make sure they share their Repl with you otherwise you’ll have to spend too much time searching for it.

And as you can see in the code in the first picture with all the #’s, I made it very clear to students which parts of the code they should edit and which parts they should leave alone. If one of your inquisitive students goes into and edits things there to the point of “breaking it,” just have them start from square one!

Here’s the little circle example their code started with!
OOooohhh!! Next stop, super-intelligent AI!

If you’re an avid reader of my blog (thank you!), you may have noticed that here I’m using with the kids, while earlier this year I was touting Colaboratory. Both are great, but I’ll be honest about why I chose to use for this project – I don’t know how to import files (like in Colab and wasn’t ready to tackle that challenge. Hey, maybe that’ll be my update for this unit next year!

Proving Python is all fun and (py)games,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s