You are here

Learning to Program With Python

I created a two-part course for beginners to learn programming using Python, where each session lasted three hours.  The course was first offered through Girl Develop It! Ottawa in June 2014.  Day 1 of the course was also use for Go Code Girl in 2014 and 2015.

The goal of the course is to give participants a basic understanding of four key concepts in programming: variables, conditionals, iteration, and functions.  The first session uses Python's turtle module to give a visual context to the concepts, and the second session reinforces these concepts by building up a simple text adventure game.  In both sessions, lots of time to try small challenges and experiment is given in between relatively short bursts of instruction.

Course Outline

Day 1: Turtle Graphics

  • Introduction to computer science and computational thinking
  • Thinking like a computer: CS Unplugged activity on programming languages
  • Turtle Graphics
  • Repetition
  • Variables
  • More Turtle Commands
  • Challenges (more complex drawings to try)
  • True, False, If
  • Functions
  • Exercises
  • Challenges

Day 2: Text Adventure

  • Introduction to Text Adventures
  • Basic User Input
    • Review of variables
  • Lists
  • Checking User Input
    • Review of if/else
    • Addition of elif
  • Loops and User Input
    • Review of reptition
    • Introduction of while loop
  • User Input Functions
    • Review of functions with parameters
  • Functions for Places to Go
  • Putting it All Together
    • Game Loop

Course Materials

Slides and links are available on the GDI course's webpage.  An updated version of Day 1 is available on my Go Code Girl course page.