CS 1110: Introduction to Computing Using Python
Times & Places
This page lists a summary of the activities of each week, in reverse chronological order. This is your go-to page for downloading in-class handouts and getting caught back up if you get behind. This page is updated dynamically all semester long, with new material added as we get there.
If you want to see what future lectures in this class will be, you should look at the syllabus page.
30 November (Thursday): Course Wrap-Up
Lab 13: Sequence Algorithms
28 November (Tuesday): Searching and Sorting
Today we complete our discussion of loop invariants and show how to use them to implement sorting. This is the last lecture covering material on the exam.
Reading: Appendix B.1-B.3
21 November (Tuesday): Sequence Algorithms (cont)
Today we continue our discussion of invariants and algorithms from the previous lecture. We review the Dutch National Flag algorithm and talk about how changing invariants can change your algorithm.
16 November (Thursday): Sequence Algorithms
Instead, today we start on the last major topic in the course: sorting. Before we get to sorting, we have start with the framework for building complex algorithms on sequences (strings, lists, etc.). This lecture covers advanced loop-invariants, and is a very important lecture for the final exam.
Lab 12: Loop Invariants
14 November (Tuesday): GUI Applications
Today we return to classes one last time, and show how classes and while-loops fit together. By the end of the lecture, we will see that class invariants and loop invariants are really the same thing in practice. Today's lecture will provide you all that you need to know to get started on the last assignment.
9 November (Thursday): Loop Invariants
Today we discuss how to design algorithms for while-loops. We introduce the notion of a loop-invariant, and show how to use that to write a program with a loop. Invariants are an important topic on the final exam, and are covered in the final labs.
Reading: Loop Invariants
Lab 11: Loop Exercises
7 November (Tuesday): While Loops
Today we introduce while-loops, which are an alternate form of iteration. They are trickier to use than for-loops, and will be an important part of the last part of the course.
Reading: Chapter 7
2 November (Thursday): Programming with Subclasses
Now that we have subclasses, there is quite a bit we can do with them. To understand how to program with subclasses, we need to understand how to make type more explicit in our programs. We do that in this lecture, including a review of the try-except statement that we saw earlier in the course.
Reading: Exceptions in Python
Lab 10: Subclassing and Encapsulation
31 October (Tuesday): Inheritance
Subclasses and inheritance are integral part of object oriented programming. It allows us to take classes that someone else created (such as the GUI classes that Kivy provides) and add functionality to them. Today we show how these features are used in Python.
Reading: Chapter 18
26 October (Thursday): Operators and Abstraction
There is a lot going on with classes in Python. There are all these mysterious methods that start with an underscore. Today we talk these mysterious methods. We show how to use these methods to create classes for mathematical types like fractions or complex numbers. As part of this, we cover the concept of abstraction, which involves hiding unnecessary details from your users.
Lab 9: Blackjack
24 October (Tuesday): Using Classes Effectively
In previous lectures, we have learned the syntax for defining classes. Today we look at the design philosophy for making classes. This lecture is very similar to Lecture 9 (Algorithm Design), except that it is for classes instead of functions.
Reading: Chapter 17
19 October (Thursday): Classes
Up until now, if we wanted to use objects, we had to import a module that provided them for us. Today we finally learn how to create our own classes. Not only can we make our own class types now, but we can even add them to the Python visualizer.
Reading: Chapters 15, 16
Lab 8: Recursion Exercises
17 October (Tuesday): More on Recursion
Today we continue to talk about recursion. We look at the different ways that we can break up a recursive function, and more advanced uses of divide-and-conquer. We also look at how recursion is used in Assignment 4.
Reading: Sections 6.5-6.9
12 October (Thursday): Recursion
Today we talk about recursion, a powerful computing tool and one of the harder concepts in the course. Recursion is one of the fundamental principles of computer science, and used for a lot of advanced algorithms. We will see many applications as the course progresses.
Reading: Section 5.8-5.10
10 October (Tuesday): FALL BREAK
5 October (Thursday): Nested Lists and Dictionaries
This lecture covers several advanced topics on sequences. In particular, we will look at the topic of multi-dimensional lists, and why we would want to use them. We also introduce dictionaries, which are similar to a sequence, but have several important differences.
Reading: Chapter 11
Lab 7: Lists & For-Loops
3 October (Tuesday): For-Loops
Lists (and sequences) come with their own special control structure: the for-loop. In this lecture we see what for-loops can (and cannot) do to make more interesting programs. The material in this lecture is the last material that will be on the first prelim.
Reading: Sections 8.3, 8.7, Chapter 10
28 September (Thursday): Lists (and Sequences)
Reading: Sections 10.1-10.2 and 10.4-10.6
Lab 6: Asserts & Debugging
26 September (Tuesday): Asserts and Error Handling
We have talked about how preconditions are a promise that indicate what your function will and will not do. Today we will show how to make them more than a promise. We will also show how error reporting relates to the call stack.
Reading: Appendix A
21 September (Thursday): Memory in Python
Throughout the past few weeks, we have seen several different ways of representing memory in Python. Today we put everything together, introducing global space, heap space, and the call stack. The latter is the collection of frames for all currently executing functions.
Lab 5: Objects & Conditionals
19 September (Tuesday): Objects
Today, we introduce the notion of objects. Objects are a new type of data. They require a new conceptual model for us to understand them. They will be a major part of Assignment 3.
14 September (Thursday): Algorithm Design
Your first assignment is very much do-this/do-that. Today we step back and see how we would design a complex program from scratch. How do we take a complex task and break it up into manageable pieces?
Reading: Section 6.2
Lab 4: Assignment 1
12 September (Tuesday): Conditionals and Control Flow
Today we talk about the difference between program structure and program flow. We also introduce the conditional, which is our first program structure for controlling program flow. This will not be necessary for Assignment 1, but will be very important in later assignments.
Reading: Sections 5.1-5.7
7 September (Thursday): Specifications and Testing
We 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. As part of testing, we will also see why comments are more important that just notes to yourself.
Reading: Docstrings in Python
Lab 3: Working with Strings
5 September (Tuesday): Strings
Python really shows off its power when working with text. Today we go into depth about the string type, which is how Python represents text. We show 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
31 August (Thursday): Defining Functions
Now that we know how to use functions, we can learn how to create our own functions. As part of this, we will learn the important difference between a function call and a function definition.
Reading: Chapter 3, Sections 6.1-6.3
Lab 2: Functions and Assignments
29 August (Tuesday): Functions and Modules
Today we introduce the concept of a module and show how they provide Python with extra (optional) functionality. We show how to use the many modules built into Python, and how to make our own modules.
Reading: Sections 3.1-3.3
24 August (Thursday): Variables and Assignments
Reading: Sections 2.2-2.9
Lab 1: Getting Started
22 August (Tuesday): Types and Expressions
In this class we give an overview of the course and its expectations. We show you how to get started with Python. In particular, we introduce types and expressions, which is the bare minimum that you need to do something "useful" in Python.
Reading: Chapter 1; Section 2.1
|Course Material Authors: D. Gries, L. Lee, S. Marschner, & W. White (over the years)|