As we said, our goal is to keep the lectures short this semester. No lecture will be
more than 10-15 minutes; the rest of the class will be filled with in-class
activities. However, we will always post the
what lecture materials we do have here.
9 March (Monday): Finishing Up
Originally, I wanted to talk about how specifications worked with classes. We are still
posting the slides for our original plan, but this day will be spent all on Assignment 2
and completing the course.
6 March (Friday): Classes
A class is the type of object. To make your own objects, you need to create a class.
Today we see how to do this.
Reading: Chapters 15, 16
4 March (Wednesday): Nested-Lists
Lists can contain any values. They can even contain other lists. This allows us to
create tables and work with spreadsheet files. This will set us up for the second
2 March (Monday): Objects
Objects are a data-type that function a little like dictionaries. While they are not
as flexible as dictionaries, they have many extra features that them much more powerful.
Today we see the trade-off between these two types.
28 February (Friday): Dictionaries
Today we introduce a new data type: dictionaries. Dictionaries kind of look like lists,
except that we access their elements differently. They are also one of the powerful
data-types in Python, allowing us to work with very rich data sets.
Reading: Chapter 11
26 February (Wednesday): For-Loops
Lists come with their own special control structure: the for-loop. Today we see what
for-loops can (and cannot) do to make more interesting programs.
Reading: Sections 8.3, 8.7, Chapter 10
21 February (Friday): Lists
Now that you are an expert of string slicing, we introduce another sliceable data type:
lists. Lists behave just like strings, except that they can contain data other than text.
Reading: Sections 10.1-10.2 and 10.4-10.6
19 February (Wednesday): Debugging
Conditionals make our programs more powerful, but they also make it harder to identify
errors. In this class we will talk about debugging strategies set you to work on some
17 February (Monday): Conditionals
Today we introduce the conditional, which is our first "control structure". We will see
how it allows us to design much more complicated functions.
Reading: Sections 5.1-5.7
14 February (Friday): Catch-Up
Today is a day to catch our breath and get up to date on all the activities. It is also
time to work on the assignment in class.
12 February (Wednesday): Integrated Development
You now know enough to work on the first assignment. However, there are a lot of pieces
that have to fit together. Today we give a basic outline of what we want and help you
get started on the assignment.
10 February (Monday): Testing Functions
You now know how to write some complex functions. However, writing functions takes a lot
of practice and you are likely make mistakes along the way. That is why it is extremely
important to test your functions and make sure they are working properly.
7 February (Friday): Specifications and Design
You know what a function definition looks like, but how would you write your own function?
The answer depends on what you are asked to do, which is why we look at specifications
and why they are so important to function design.
Reading: Docstrings in Python
5 February (Wednesday): Function Definitions
Now that we know how to use functions, we can learn how to create our own functions.
In particular, we will learn the difference between a function call and a function
3 February (Monday): Modules and Scripts
Today we show how to create our own modules. We also introduce the concept of a
script and see how it is different from a module.
This will be a long day. You will have to finish this activity over
31 January (Friday): Strings
Today we go into depth with the string type, which is how Python represents text. We
see how to cut up text and paste it back together. The techniques that we learn will
be very important for the first assignment.
Reading: Sections 8.1-8.2, 8.5, 8.8
29 January (Wednesday): Functions
Today we show how call functions in Python. We also introduce the concept of a module
and show how modules provide Python with extra (optional) functionality.
Reading: Sections 3.1-3.3
27 January (Monday): Variables
Today we introduce the notion of a variable, and how an assignment statement works. This
our first step into real programming.
Reading: Sections 3.1-3.3
24 January (Friday): Expressions
Today we introduce types and expressions, which is the bare minimum that you need to do
something "useful" in Python.
Reading: Chapters 1 and 2
22 January (Wednesday): Orientation
This first day, we give an overview of the course and its expectations. We will then spend
the rest of the class helping you get Python installed on your computers. Remember to
bring your laptop!