My Intro to Programming classes are finally getting to be a lot of fun. Having learned the basic tools of functional programming (control flow, types, functions...), my students can finally reap the rewards using the turtle module that's included in Python--and learn some OOP at the same time.
Teaching students to program turtles goes way back, but for me it never gets old. The image shows what a turtle can do when it moves to a random location, puts down it's pen tip and draws a somewhat randomly colored circle. I say somewhat because the parameters are tweaked in ways to prevent total random ugliness that comes from choosing colors totally randomly. Here, you see some beautiful shades of blue and purple blending together.
It hasn't been all that easy in my first semester teaching Python to students new to programming. My ELL students really struggled with syntax errors. Now, however, all my students have some of the basic tools of programming. Now it's time to let 'em go and be creative. At this point it's fun to write 3 or 4 sample programs and then watch as the students copy them, run them, and then start to alter them. When I learned to program I never had a teacher give me code to alter. Not sure why. Seems like a natural form of communication between teacher and student. It's fun to put comments in code like:
## Okay, try messing around with these variable settings
## and see what you can come up with. If you find
## something cool, share it with others!