Python Intro for Libraries

This lesson is an introduction to programming in Python for librarians with little or no previous programming experience. It uses examples that are relevant to a wide range of library use cases, and is designed to be used as a prerequisite lesson for other Python based lessons that will be developed in the future, e.g. using the Pandas for data analysis.

Prerequisites

  1. Learners need to understand what files and directories are, what a working directory is, and how to start a Python interpreter from a terminal window.

  2. Learners must install Anaconda before the class starts.

Schedule

Setup Download files required for the lesson
09:00 1. Variables and Assignment How can I store data in programs?
09:20 2. Data Types and Type Conversion What kinds of data do programs store?
How can I convert one type to another?
09:40 3. Libraries How can I extend the capabilities of Python?
How can I use software that other people have written?
How can I find out what that software does?
10:00 4. Lists How can I store multiple values?
10:20 5. For Loops How can I make a program do many things?
10:45 6. Writing Functions How can I create my own functions?
11:10 7. Variable Scope How do function calls actually work?
How can I determine where errors occurred?
11:30 8. Conditionals How can programs do different things for different data?
11:55 9. Programming Style How can I make my programs more readable?
How do most programmers format their code?
How can programs check their own operation?
12:25 10. Wrap-Up What have we learned?
What else is out there and where do I find it?
12:45 11. Feedback How did the class go?
13:00 Finish

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