T-Th 9:05 |
CS 1110: Introduction to Computing Using Python Fall 2013 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Main
About: Announcements Staff Consultants Times & Places Calendar Materials: Texts Python Command Shell Terminology VideoNote Handouts: Lectures Assignments Labs Assessment: Grading Exams Resources: CMS Piazza AEWs FAQ Python Tutor 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 17Week 16Week 155 December (Thursday): Where to From Here?
[Presentation]
Lab 12: Sequence Algorithms
[Instructions]
3 December (Tuesday): Sorting[Handout] [Presentation]
Today we complete our discussion of loop invariants and show how to use them to implement sorting. We also review the important algorithms that you should know for the exam. These include binary search, Dutch National Flag, partition, selection sort, and insertion sort. Week 1428 November (Thursday): THANKSGIVING
26 November (Tuesday): Sequence Algorithms (cont.)[Handout] [Presentation]
Today we complete the lecture we started last Thursday. There are no new slides or handouts for this lecture. Week 1321 November (Thursday): Sequence Algorithms[Handout] [Presentation]
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. Reading: Chapter 13 Lab 11: Loops and Invariants
This lab integrates what we have learned about invariants with while-loops. It is just like the last one, except that now you are using invariants to design your loops. This lab is due before you leave for Thanksgiving Break. See the lab instructions for how to turn in this lab. 19 November (Tuesday): Controllers and OO Design[Handout] [Presentation]
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. Reading: Model-View-Controller for Noobs Week 1214 November (Thursday): Loop Invariants[Handout] [Presentation]
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 next two labs. Reading: Loop Invariants Lab 10: While-Loops
This is the first of three labs involving loops. It includes both for loops over ranges integers and over more complicated conditions. Given both the exam and the assignment, we have tried to make this lab reasonable. 12 November (Tuesday): While Loops[Handout] [Presentation]
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 third of the course. Reading: Chapter 7 Week 117 November (Thursday): Classes as 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 types affect the outcome of certain commands and operations. Reading: Errors and Exceptions Lab 9: Properties and Subclasses
This is a short(ish), but fun, lab that gives you experience with subclasses. In particular, you can see how subclasses can be very useful in graphics applications. We have also added an exercise with properties, as students often find those confusing. 5 November (Tuesday): Subclasses and Inheritance[Handout] [Presentation]
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 Week 1031 October (Thursday): Advanced Class Design[Handout] [Presentation]
Now that we know how to design classes, it is time dig deep into Python. Python has some extremely powerful features that allow use to customize our classes in particular ways. In particular, we will see Operator Overloading, which allows us to change how operators like +, *, and == work. We will also see properties, which is a special way to enforce class invariants. Reading: Chapter 18 Lab 8: Blackjack
This is a straight-forward lab that gives you some experience working with classes. And when you are done, you can play a nice game of blackjack. 29 October (Tuesday): Using Classes Effectively[Handout] [Presentation]
Walker White is away at a conference today. Your lecture is presented by Steve Marschner, one of the instructors from the Spring semester version of CS 1110. Last lecture we saw how the syntax for define classes. Today we look at the design philosophy for constructing classes. This lecture is very similar to Lecture 8 (Algorithm Design), except that it is for classes instead of functions. Reading: Chapter 17 Week 924 October (Thursday): Classes[Handout] [Presentation]
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 7: Recursion Exercises
This lab gives you experience with writing recursive functions. All of the functions in this lab are either be recursive functions on sequences, or recursive functions on integers, just as we saw in class. This is a very long lab, but you have until a week after Fall Break to finish it. 22 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 look at how recursion is used in Assignment 4. Reading: Sections 6.5-6.8 Week 817 October (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 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 15 October (Tuesday): FALL BREAK
Week 710 October (Thursday): More with Sequences[Handout] [Presentation]
This lecture will cover 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 will also introduce dictionaries, which are similar to a sequence, but have several important differences. Reading: Chapter 11 Lab 6: Lists and For-Loops
[Instructions]
8 October (Tuesday): For-Loops[Handout] [Presentation]
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. This topic is the last material that (may) appear on the first prelim. Reading: Sections 8.4, 8.7; Chapter 10 Week 63 October (Thursday): Lists (and Sequences)
[Handout]
[Presentation]
Reading: Sections 10.0-10.2 and 10.4-10.6 Lab 5: Conditionals and Asserts
This lab gives your some experience with conditionals, which we covered over a week ago, and which are necessary for Assignment 3. It also has a few minor questions on asserts and error handling. The exercises in this lab are prime exam questions. In fact, the Pig Latin question is actually from Prelim 1 in a previous semester of CS 1110. 1 October (Tuesday): Asserts and Error Handling[Handout] [Presentation]
Today we complete our discussion of the call stack. We show how it relates to error reporting in Python. We also show how to "recover" from some errors. Week 526 September (Thursday): Memory and the Call Stack[Handout] [Presentation]
Today we back up a bit, and try to look at the bigger picture. We present an overview of how variables are handled in Python, with regards to global space, call frames, and heap space. We review call frames and put them in the context of call stack, which is the collection of frames for all currently executing functions. Important: The slides in class had numerous typos. The slides on this web page are the most up-to-date. Reading: Sections 3.9-3.10 Lab 4: Assignment 1
In recognition of the length of the last lab and the looming assignment, today's lab is a chance for you to work on assignment 1. You do not have to show to lab, but consultants are available to give you help. You will get credit for the lab so long as you turn in assignment 1 on time. This lab does have some optional exercises. These are for practice only (you will find them helpful for the exam), and are not required. 24 September (Tuesday): Algorithm Design[Handout] [Presentation]
The 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: Chapter 4 Week 419 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 program flow. This will not be necessary for Assignment 1, but will be very important in later assignments. Reading: Sections 5.1-5.7 Lab 3: Modules and Testing
This lab is bit longer than the previous ones. This is an intensive, hands-on lab to give you a lot of experience with testing and debugging. You will find these skills extremely useful for the rest of the course. The online version of the lab includes an optional exercise that is very relevant to the first assignment. 17 September (Tuesday): Specifications and Testing[Handout] [Presentation]
Today we cover the last material needed for the first assignment. We learn how to test functions and make sure that they are working properly. In addition, we learn why comments are more important that just as notes to yourself. Reading: Docstrings in Python Week 312 September (Thursday): Objects[Handout] [Presentation]
Today we finish the function lecture with a discussion of call frames. In addition, we introduce the notion of objects. Objects are a new type of data. They require a new conceptual model for us to understand them. Lab 2: Functions, Strings, and Modules
[Instructions]
10 September (Tuesday): User-Defined Functions[Handout] [Presentation]
Now that we know how to use modules, today we learn how to create our own modules. As part of this, we will learn a lot more about functions. In particular, we will learn the difference between a function call and a function definition. Reading: Sections 3.1-3.8, Sections 6.1-6.4 Week 25 September (Thursday): Strings, Functions, and Modules
[Handout]
[Presentation]
Reading: Chapter 8 (not 8.6, 8.11) Lab 1: Evaluating Expressions
[Instructions]
3 September (Tuesday): Variables and Assignments
[Handout]
[Presentation]
Reading: Sections 2.2-2.9 Week 129 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 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Course Material Authors: D. Gries, L. Lee, S. Marschner, & W. White (over the years) |