Learning Python
Using this course
The primary purpose for this course is to be able to complete the following 7 assignments:
To help you complete the assignments, you will find a set of recorded lectures below that introduce you to the concepts needed. Along with the videos, you will find a link to the slides in HTML format. You can also find a PDF version of the slides in this Github respository.
Optional Pre-course Materials
Udacity
If you have very little programming experience, it can be helpful to walk through the basics with an online, interactive interface. There are many of these online, but the following is free and reasonable:
You should only need to complete lessons 1-2 to be ready to continue with our assignments.
0. Introduction to Python + Variables
This module has no assignments, but gives a brief introduction to Python and shows how variable assignment works in Python. If you feel you need exercises with the basics of variable assignment, please take a look at the Udacity course listed above.
What is Python
Variables
1. Functions and Catching Exceptions
This module introduces the two most fundamental building blocks for building programs in Python: functions and exceptions. Assignment!
Functions
Catching Exceptions
2. Conditionals and Raising Exceptions
This module introduces control flow (if
, elif
, else
, etc.) and shows us how to use control flow to raise our own exceptions when things don’t look as expected. Assignment!
Conditionals
3. Lists and Loops
This module introduces the basic building blocks for iterating in Python: the list and the for loop, as well as three basic patterns for working with lists: map, filter, reduce. Assignment!
Lists and Loops
4. Tuples and Dictionaries
This module introduces two important data structures, the Tuple and the Dictionary, and introduces patterns for working with lists of tuples and lists of dictionaries. Assignment!
List Operations and Tuples
Dictionaries
5. Classes
This modules introduces the basic building block of Object Oriented Programming (OOP): the class. Assignment!
Classes
6. Modules and JSON
This module includes information about working with modules and loading JSON data: an important data serialization format that fits well with the type of data we’ve been working with so far. Assignment!
Modules
Working with JSON Data
7. Test
This assignment brings everything we’ve been working on together to give you more practice. You can think of it like an “exam”, you should be able to complete it in a reasonable amount of time (5 hours). Test!