Week 1:
Tuesday, 1/22
Lecture: Course introduction; why do life science researchers should care about programming? Our first program and some programming errors [ slides ]
Reading: Chapter 1 in How to think like a computer scientist.
Thursday, 1/24
Lecture: Some basic linux; Python types, variables
Reading: Chapter 2 in the book.
Week 2:
Tuesday, 1/29
Lecture: Python expressions using expressions: celsius to fahrenheit conversion; introduction to functions [ slides ] some code: draw_rectangle, c2f conversion with functions, using functions.
Reading: Chapter 3 in the book.
Thursday, 1/31
Lecture: Functions: LocalVariables; putting logic into a program: Boolean expressions and conditionals .
Reading: Chapter 4 in the book.
Week 3:
Tuesday, 2/5
Lecture: More conditionals: sort names, letter grade calculator, a better version of letter grade.
Functions that return a value. Examples: area, divisibility, absolute value.
Reading: Chapter 4 and Chapter 5 in the book.
Thursday, 2/7
Lecture: Iteration in Python: while loops.
Reading: Chapter 6 in the book.
Lab: Lab3
Week 4:
Tuesday, 2/12
Lecture: More on while loops: input validation; iteration using for loops, tables, strings
Reading: Chapter 7 in the book.
Thursday, 2/14
Lecture: strings continued
Reading: Chapter 7 in the book.
Lab: Lab4
Week 5:
Tuesday, 2/19
Lecture: Strings, continued. String formatting
Reading: Chapter 7 in the book.
Thursday, 2/21
Lecture: Python lists
Reading: Chapter 9 in the book.
Lab: Lab5
Week 6:
Tuesday, 2/26
Lecture: Lists are mutable (code), lists as function parameters (code), nested lists (code).
Reading: Chapter 9 in the book.
Thursday, 2/28
Lecture: Reading from a file
Lab: Lab 6
Week 7:
Tuesday, 3/5
Lecture: For loops and iterators, Writing to a file (code).
Thursday, 3/7
Lecture: Midterm.
Week 8:
Tuesday, 3/12
Lecture: Sorting [ slides ] and here's code.
Thursday, 3/14
Lecture: Sorting (cont), command-line arguments.
Lab: Lab 7
Week 9:
Tuesday, 3/26
Lecture: Recursion [ slides ] and code examples
Reading: chapter 11
Thursday, 3/28
Lecture: Continue recursion.
Lab: Lab 8
Week 10
Tuesday, 4/2
Lecture: Dictionaries (example code)
Reading: chapter 12
Thursday, 4/4
Lab: Lab 9: Dictionaries.
Week 11
Tuesday, 4/9
Lecture: Using Python objects - methods, and writing your own Python classes.
Reading: chapter 13 and chapter 15
Thursday, 4/11
Lab: Lab 10: Python classes and generating random numbers.
Week 12
Tuesday, 4/16
Lecture: More Python classes: Some shape classes; the cards example, and operator overloading
Reading: chapter 15
Thursday, 4/18
Lecture: exceptions
Lab: Lab 11: More practice with Python classes.
Reading: chapter 11
Week 13
Tuesday, 4/23
Lecture: Inheritance in Python. new classes.
Reading: chapter 17
Thursday, 4/25
Lab: Lab 12: Inheritance.
Week 14
Tuesday, 4/30
Lecture: Plotting with matplotlib. Here's a simple example
Reading: The matplotlib tutorial.
Thursday, 4/25
Lab: Lab 13: working with matplotlib.
Week 15
Tuesday, 5/7
Lecture: More plotting with matplotlib. subplots, legends, histograms. We will also discuss how to install packages. As an example, we will install biopython.
Reading: The matplotlib tutorial.
