Skip to content

Introduction to Intermediate Python

This course assumes you are familiar with beginning concepts in Python such as variables, loops, conditionals, random numbers, functions, function parameters, lists and basic recursion. We strongly suggest that you have completed the CoderDoj Twin Cities Beginning Python Class BEFORE you do the intermediate labs.

Note that you can do the first four lessons using web-based Python programming tools like or Starting with lesson #5 on Files you will need to have Python installed on your local computer. Please visit the web site for the installation instructions on your operating systems. You can use the command-line version of Python from a Terminal or shell or you can install one of the Python Integrated Development Environments (IDEs).

The concepts in this course include:

  1. Variables and Scope - In this lab we learn that you can control what parts of your program can access a variable. This comes in handy when we write larger programs.
  2. Data types - This lab give you a tour of some of the data types in Python other than boring strings and integers.
  3. Checking Data Types of Function Parameters - in the beginning course we learned how to pass parameters to functions. Now we learn how to make sure our functions get the data that they expect!
  4. Maps - Maps or dictionaries are sets of key-value pairs that are crazy flexible. Unlike a list, where the index can only be fixed sequence of integers starting with 0, the keys in a map can be any integer or string in any order.
  5. Files - In this lesson we will learn how to open a file and read the data into our program with just a few lines. Not only can we read in data, but we can also write out data! So much power in a few lines of code!
  6. Images - In our CoderDojo AI Racing League we will be learning how to make a car drive autonomously. But first we need to be able to read in images and display them. In this lab we will show you how easy this is!
  7. Defining Your Own Modules - In the Beginning Python class we learned how to create functions. Now we learn how to package them up so they are easy for others to use.
  8. dir() function - If you ever want to know what functions you can throw at something we got this secret tool called "dir". It really takes the mystery out of what functions you can use and avoids trying to guess what function names are used. Not that guessing games aren't fun!
  9. Regular expressions - You sometimes want a list of all the files in a folder that have a .jpg extension for images. This lesson will show you how we can use a shorthand notation to make it easy to specify what files to include and which ones to skip.
  10. Debugging - When we have a hard time understanding what our programs are doing we need to be able to peak in and see the results of small steps of our programs. This lesson will show you how to squash those little "bugs" or errors in our code. (not real bugs, that would be mean!)