ICS 32 Winter 2022
Notes and Examples
Notes and examples, from lecture and otherwise
Over the course of the quarter, I'll be providing notes and commented code examples for you, most especially when I write substantial code examples in lecture — beyond just experimentation in the Python interpreter or short code fragments —. When I do, I will be turning them into full-scale code examples and posting them here for you. Be aware that there is a process involved in fleshing out a lecture example — rather than just posting code exactly as we wrote it, I'd like to turn it into something more complete and instructive — and this process takes some time, so it's best, in general, not to expect these to be available right away, but I will generally try to have them available before the next lecture, at the latest.
Note that you are not permitted to simply copy and paste this code into your own projects, but, of course, the techniques employed may also be of general use to you in your work. These examples are intended to give you clean, well-documented examples of some of the things we cover in lecture (and possibly a few things that we don't, time permitting), so that you can be free in lecture to avoid trying to take detailed notes when we're writing code together, instead concentrating on understanding the process and the bigger-picture concepts at work.
Lecture Week | Title |
Week 1 | Course Introduction |
Week 1 | Paths and File Systems |
Week 1 | Exceptions and Files |
Week 2 | Testing |
Week 2 | Recursion |
Week 2 | Modules |
Week 3 | Networks and Sockets |
Week 3 | Protocols |
Week 4 | Classes |
Week 4 | Duck Typing and Interfaces |
Week 5 | URLs and HTTP |
Week 5 | Web APIs |
Week 6 | Two-Dimensional Lists |
Week 6 | Test-Driven Development |
Week 7 | Third-Party Libraries |
Week 7 | PyGame Basics |
Week 7 | The "Spots" Game |
Week 8 | Inputs and Sounds |
Week 8 | Tkinter Basics |
Week 9 | Tkinter Layout |
Week 9 | A Tkinter Application |
Python prerequisite background
If it's been a while since you've last used Python, you might also want to work through the following sections, which take you through the prerequisite background in Python that you would need in order to succeed in this course.
Title |
Python Basics |
Functions |
Tuples and Lists |
Type Annotations |
Files |
Namedtuples |
Sets and Dictionaries |