Python as a Second Language

This lesson is an introduction to programming in Python for people who are already comfortable in some other language such as Perl or MATLAB. This lesson references the Jupyter Notebook, but can be taught using a regular Python interpreter as well. Please note that this lesson uses Python 3 rather than Python 2.

Under Design

This lesson is currently in its early design stage; please check the design notes to see an outline of what we have so far, or the episodes for more details. Contributions are very welcome: we would be particularly grateful for exercises and for commentary on the ones already there.

Prerequisites

  1. Learners need to understand what files and directories are, what a working directory is, how to start a Python interpreter, and what variables, loops, conditionals, indexing, and function calls are.

  2. Learners must install Python before the class starts.

    Please see the setup instructions for details.

Schedule

09:00 Basics How do I run Python programs?
What are Python’s basic data types?
09:45 Control Flow How do I repeat operations?
How do I make decisions?
How do I call built-in functions?
10:15 Libraries How can I use Python’s standard libraries?
Where do I find documentation on Python’s standard libraries?
10:35 Morning Coffee Break
10:50 Writing Functions How can I make code more readable?
How can I make code reusable?
11:25 Dictionaries How can I store and manipulate non-rectangular data?
12:00 Lunch Break
13:00 NumPy Arrays How can I store and manipulate arrays?
How can I do linear algebra?
13:40 Pandas How can I do statistical analysis of tabular data?
14:20 Afternoon Coffee Break
14:35 Plotting How can I plot my results?
15:05 File I/O How can I read data from a file?
How can I write data to a file?
15:20 Programming Style How can I make programs more robust?
How can I make programs easier to understand?
15:35 Testing How can I tell if my program is working?
How can I tell if my program is still working?
16:00 Wrap-Up What have we learned?
16:10 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.