T-Th 9:05 |
CS 1110: Introduction to Computing Using Python Fall 2012 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Main
About: Announcements Staff Consultants Times & Places Calendar Materials: Texts Python Command Shell Terminology Handouts: Lectures Assignments Labs Assessment: Grading Exams Resources: CMS Piazza (link) Piazza (about) AEWs FAQ Python API Style Guide Academic Integrity |
Lecture SummariesThis 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. Week 16Week 1529 November (Thursday): Where to From Here?
[Presentation]
Lab 12: Timing Performance
[Instructions]
27 November (Tuesday): Statically-Typed Languages[Handout] [Presentation]
Today's lecture is to help ease the transition a bit to 2110. We give you a brief introduction to the concept of statically typed languages, and discuss why they are so useful (but also so much harder to use). Week 1422 November (Thursday): THANKSGIVING
20 November (Tuesday): Stateful Controllers[Handout] [Presentation]
It is obvious why models in the model-view-controller pattern should be defined by classes. Furthermore, views are always subclasses of a GUI library. But why does a controller have to be a class? We did not use classes to define the controller in A3. Today we answer this question. As part of the answer, we see that loop invariants and field invariants are the same idea. Reading: Chapter 19 Week 1315 November (Thursday): Catch Up
Lab 11: Loop Invariants
[Instructions]
13 November (Tuesday): Searching and Sorting[Handout] [Presentation]
Today we continue talking about invariants and sequences, and use this to implement several important algorithms (one of which will be on the final). This lecture will probably roll over to Thursday, but we are posting all of the notes for today and Thursday with this lecture. Week 128 November (Thursday): Sequence Algorithms[Handout] [Presentation]
Today we talk about how to create complex algorithms on sequences (strings, lists, and tuples). This lecture covers advanced loop-invariants, and is a very important lecture for the final exam. Do not skip this lecture. Reading: Chapter 13 Lab 10: Loop Exercises
[Instructions]
6 November (Tuesday): Loop Invariants
[Handout]
[Presentation]
Reading: Loop Invariants Week 111 November (Thursday): While Loops[Handout] [Presentation]
Today is a short lecture, as we need to catch up on the remainder of the previous lecture. 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 third of the course. Reading: Chapter 7 Lab 9: Encapsulation and Data
[Instructions]
30 October (Tuesday): OO Design[Handout] [Presentation]
Today is a "big-picture" lecture that puts all of the details that we have learned so far into perspective. It shows why object-oriented programming is useful, and gives some hints about what you would learn in later courses. This is the last material that will be on the second prelim. Reading: Model-View-Controller Week 1025 October (Thursday): Classes and Types[Handout] [Presentation]
Types are an important part of any programming language, even Python (despite what some internet blogs may say to the contrary). In this lecture we show how important types are in programming, and how classes provided a lot of important functionality regarding types. Reading: Section 14.1-14.5 Lab 8: Sublasses
[Instructions]
23 October (Tuesday): Inheritance[Handout] [Presentation]
Today we talk about subclasses and inheritance: an important part of object oriented programming. This allows us to take classes that someone else created (such as the GUI classes that Kivy provides) and add functionality to them. Reading: Chapter 18 Week 918 October (Thursday): Properties and Methods[Handout] [Presentation]
Today we show off some very advanced features about classes in Python. These features allow us to do things such as enforce invariants, or make objects that look and behave like the primitive types. Even the experienced Java programmers will learn something today. Reading: Chapter 17 Lab 7: For-Loops and Classes
[Instructions]
16 October (Tuesday): Classes[Handout] [Presentation]
Today we start the next major segment of the course. We finally learn what all of this "object-oriented" stuff is about. We have seen objects, but they are a bit mysterious and always required some special module in the background. Today we learn about classes, and how to write these special modules. Reading: Chapters 15, 16 Week 811 October (Thursday): For-Loops and Dictionaries[Handout] [Presentation]
Coming back from Fall Break, we will learn about for-loops, which is an alternative to recursion that works in some applications. In addition, we will talk about dictionaries, which are another type for storing collections of data. Reading: Sections 8.4, 8.7; Chapters 10, 11 9 October (Tuesday): FALL BREAK
Week 74 October (Thursday): Catch-Up Lecture
We have been about a half a lecture behind for a while today. Instead of introducing new material (we have moved for-loops to after Fall Break), we will simply finish recursion. We will also play with the Python visualizer that we announced on Piazza. Lab 6: Recursion Exercises
[Instructions]
2 October (Tuesday): More on Recursion[Handout] [Presentation]
Today we continue talking about recursion, with several examples. We look at the different ways that we can break up a recursive method. We also introduce some of the ideas that will be used in Assignment A4 after Fall Break. Reading: Sections 6.5-6.8 Week 627 September (Thursday): Recursion[Handout] [Presentation]
Today we talk about recursion, a powerful computing tool and one of the harder concepts in the course. Recursion is one of the foundamental 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 Lab 5: Lists and Asserts
[Instructions]
25 September (Tuesday): Lists (and Sequences)
[Handout]
[Presentation]
Reading: Sections 10.0-10.2 and 10.4-10.6 Week 520 September (Thursday): Call Stacks[Handout] [Presentation]
Today we return to the notion of the call frame. We put it in the context of the bigger "call stack", which is the collection of frames for all currently executing functions. We also show how this is relevant to error detection in your program. Reading: Sections 3.9-3.10 Lab 4: Strings and Conditionals
[Instructions]
18 September (Tuesday): Algorithm Design[Handout] [Presentation]
The first assignment was 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: Chapter 4 Week 413 September (Thursday): Conditionals and Control Flow[Handout] [Presentation]
Today we talk about the difference between program structure and program flow. We also introduce the condition, which is our first program structure for controlling flow. This will not be necessary for Assignment 1, but will be a major part of Assignment 3. Reading: Sections 5.1-5.7 Lab 3: Functions and Testing
[Instructions]
11 September (Tuesday): Specifications and Testing[Handout] [Presentation]
Today we learn how to test functions and make sure that they are working properly. This is an important lecture, and the last one that you will need to work on assignment 1. Reading: Docstrings in Python Week 36 September (Thursday): User-Defined Functions[Handout] [Presentation]
Today we show how to define our own functions and to do interesting things with modules. In many ways, this is our first day writing actual programs. You will need Komodo Edit working properly to use what you learn today. Reading: Sections 3.5-3.13 and 6.1-6.4 Lab 2: Using Object APIs
[Instructions]
4 September (Tuesday): Strings and Objects[Handout] [Presentation]
Today we talk about two complex data types: strings and objects. For strings, we look at string slicing, and see how to extract a substring, or even individual characters from a string. Objects are a more general data type. To understand them, we introduce the folder metaphor which we will use throughout this course. Reading: Chapter 8 (not 8.6, 8.11) Week 230 August (Thursday): Modules and Functions[Handout] [Presentation]
Today we move away from the interactive shell to using a text editor to write Python code. We see how we can use it to write much more complex programs. As the code becomes more complex, we need to break it up into little building blocks, which we call functions. Reading: Sections 3.1-3.4 Lab 1: Evaluating Expressions
[Instructions]
28 August (Tuesday): Variables and Assignments
[Handout]
[Presentation]
Reading: Sections 2.2-2.9 Week 123 August (Thursday): Types and Expressions[Handout] [Presentation]
We give an overview of the course and its expectations. We show you how to get started with Python. Finally, we talk about types and expressions, which is the bare minimum that you need to do something "useful" in Python. Reading: Chapter 1; Section 2.1 |