Lectures

Click on a lecture to see the video, if it is available. Videos are restricted to a valid Cornell netid login. However, slides and demo code may be downloaded without a Cornell netid.

Loop Invariants

Lectures

The online reading is Loop Invariants.

Today we discuss how to design algorithms for while-loops. We introduce loop invariants, which are powerful programming technique.    Watch ›

November 19, 2019 slides handout demos

While Loops

Lectures

The reading for this lecture is Chapter 7.

Today we introduce while-loops, which are an alternate form of iteration. We show why they are different from for-loops, and when to use them.    Watch ›

November 14, 2019 slides handout demos

Typing and Subclasses

Lectures

The online reading is Exceptions in Python.

Typing is the act of determining the type of a value. Today we question why typing is so important, and show some challenges of typing.    Watch ›

November 12, 2019 slides handout demos

Operators and Abstraction

Lectures

There is no supplementary reading for this lecture.

We have seen several mysterious double-underscore methods in Python classes. In this lecture show why these methods are so important.    Watch ›

November 7, 2019 slides handout demos

Inheritance

Lectures

The reading for this lecture is Chapter 18.

This lecture introduces subclasses, which can add extra functionality to an existing class. Subclasses and inheritance important parts of object oriented programming.    Watch ›

November 5, 2019 slides handout demos