This lesson is an introduction to programming in Python for people with little or no previous programming experience. It uses plotting as its motivating example, and is designed to be used in both Data Carpentry and Software Carpentry workshops. 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.
This lesson is currently in its early design stage; please check the design notes to see what we have so far. Contributions are very welcome: we would be particularly grateful for exercises and for commentary on the ones already there.
Learners need to understand what files and directories are, what a working directory is, and how to start a Python interpreter.
Learners must install Python before the class starts.
Learners must get the gapminder data before class starts: please download and unzip the file python-novice-gapminder-data.zip.
Please see the setup instructions for details.
|00:00||Jupyter Notebooks||How can I run Python programs?|
|00:10||Markdown in Jupyter Notebooks||How can I place HTML-like information in my Jupyter Notebook?|
|00:10||Variables and Assignment||How can I store data in programs?|
|00:25||Data Types and Type Conversion||
What kinds of data do programs store?
How can I convert one type to another?
|00:40||Built-in Functions and Help||
How can I use built-in functions?
How can I find out what they do?
What kinds of errors can occur in programs?
|01:00||Lists||How can I store multiple (associated) values?|
|01:35||For Loops||How can I make a program do many things?|
|02:05||Conditionals||How can programs do different things for different data?|
How can I use software that other people have written?
How can I find out what that software does?
|03:00||Social Get-Together and Overnight Break||Break|
|04:00||Reading Tabular Data into DataFrames||How can I read tabular data?|
|04:20||Pandas DataFrames||How can I do statistical analysis of tabular data?|
|04:40||Looping Over Data Sets||How can I process many data sets with a single command?|
|04:55||Plotting||How can I plot my data?|
How can I create my own functions?
How do function calls actually work?
How can I determine where errors occurred?
How do I write and save Python commands as scripts?
How can I run a Python script from the command line?
How can I make my programs more readable?
How do most programmers format their code?
What have we learned?
What else is out there and where do I find it?
|06:55||Feedback||How did the class go?|
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.