Readings
Day 1
Day 2
3.2-3.3 Types
4.2-4.3 Boolean expressions & logical operators
4.4-4.7 Conditionals
4.12 Keyboard input
Day 3
7.1-7.2 lists
7.4-7.6 String slices, comparisons, immutability
8.1-8.3 Lists
8.4, 8.6-8.9 List membership, operations, slices, mutability, deletion
8.11-8.12 Aliasing & cloning lists
8.14-8.15 Nested lists
9.1-9.2 Tuples
Day 4
6.2 The while statement
7.3 Traversal and the for loop
Day 5
1.3 What is debugging?
Appendix A Debugging
Day 6
10 intro - 10.3 Dictionaries
9.1-9-3 Tuple
3.6-3.11 Functions
4.9, 5.1 return
Day 7
Review Appendix A - debugging
11 intro, 11.1, 11.3-11.4 File input/output
Day 8
3.4 Math functions
9.4 Random numbers
9.5 List of random numbers
Day 9
12, 13 Object Oriented Programming
Day 10
Chapters 14 - 16 - Object Oriented Programming and Inheritance
Day 11
Review 12-16 - OOP
4.9-4.10, 5.5, 17.4 - Recursion
Homework and projects
Checkoff 1, due Mon Jan 12 at 5 p.m.
Install Python and the matplotlib and numpy libraries by following the Getting started guide. Next, check that your installation works by running pkgtest.py. Running the file produces should produce a graph.
For your checkoff, you will run this file for an LA and demonstrate how to create a new Python file. Our goal is to make sure everyone is ready to get coding and understands office hours procedures.
Thanks to 6.0001 for letting us use the installation guide and test file.
Checkoff 2, due Wed Jan 14 at 5 p.m. ***updated 1/13 @ 10:18AM**
Checkoff 3, due Fri Jan 16 at 5 p.m.
Checkoff 4, due Tue Jan 20 at 5 p.m. **updated 1/19 @ 5:17PM**
Checkoff 5 has been updated. If you already started on the old 5.2 and 5.3 (math and random), don't worry! They'll be on Checkoff 6. Sorry for the confusion! This change makes the checkoff closer to what we covered in lecture, and cuts the amount of code you have to write by 60%.
Checkoff 5, due Thu Jan 22 at 5 p.m.
Project 1, due Fri Jan 23 at 5 p.m.
Checkoff 6, due Mon Jan 26 at 5 p.m.
Project 2, due Fri Jan 30 at 5 p.m.
Checkoff 7, due Wed Jan 28 at 5 p.m.
Lecture materials and code
Syllabus
Review the syllabus (PDF) before the first day of class.
Day 1
The lecture notes cover some FAQs and organizational concerns, as well as variables, mathematical operations, and a high-level overview of where we're going with the class.
Day 2
The lecture 2 notes discuss control flow. See lec02.py for an example of if, elif, and else statements used in conjunction with user input.
Day 3
The lecture 3 notes cover string methods and introduce a new type, lists. We learn about mutability, and how it can cause unexpected results in our programs.
Day 4
lecture 4 notes: lec04.py
If you think the pace of class is too slow, work on one of the boredom busters when we're discussing a topic you understand.
Day 5
Here are lecture notes. The following are pieces of example code we may or may not have gotten to in class that day: style, basic functions, common mistakes, an example to debug, and an example using pdb
Day 6
Day 7
Day 8
Day 9
Day 10
attribute_vs_subclass.py Note: minor changes may have been made to this file for lecture
Day 11
Day 12
Layout and design (c) 2008 by Carnegie Mellon University. XHTML implementation (c) 2008 by Aseem Kishore.
Course material (c) 2009-2011 by Sarina Canelake.