pycon logo

PyCon 2011 Atlanta

March 9th–17th

Log in or Sign Up

Python and Robots: Teaching Programming in High School

log in to bookmark this presentaton

Novice / Talk
March 12th 2:55 p.m. – 3:40 p.m.
Combining Python with inexpensive robots is a very effective way of teaching programming at the middle and high school levels. Since Python is easy to understand a constructivist approach is possible - students learn by creating and running simple programs, observing the results, and then modifying their code to fix bugs and add functionality.


The approach suggested in this talk is partly based upon that developed at the Institute for Personal Robots in Education ( by staff from Georgia Tech and Bryn Mawr, combined with my own experiences teaching programming with Python as described in my talk "Goodbye, Hello World: Rethinking Teaching with Python", PyCon 2007, and my subsequent talks at NECC.

Because students are able to see what their code is doing and because Python is easy to understand, students can explore simple programming concepts, learning features as they need them. This approach increases both student engagement and retention. It also seems that this approach is more appealing to girls than a more traditional programming class.

I'll illustrate my talk with samples of code created by students and video of the students/robots in action.


Introduction - school background, course structure, origin of approach

Hardware and computer setup used

Initial exercises and first projects

  • Control of robot
  • Program as sequence of commands
  • Basic programming concepts - looping, branching, functions

Advanced projects

  • obtacle detection
  • image processing
  • simple AI approaches

Pitfalls and strategies for using robots

Questions and Suggestions