T-Th 9:05 |
CS 1110: Introduction to Computing Using Python Spring 2018 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() Main About: Announcements Staff & Hours Lectures & Labs Materials: Texts/Clickers Python/Komodo Command Shell Terminology VideoNote Handouts: Lectures Assignments Labs Assessment: Grading Exams Resources: CMS - direct link CMS usage Piazza AEWs FAQ Python Docs Python Tutor: Classic CS1110 version Other Courses Academic Integrity |
Lecture SummariesThis page lists a summary of the lectures for 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. Week 158 May (Tuesday): Sorting and Searching and What's Next![Handout] [Presentation]
Today we review our Partition function and use it to write QuickSort. Now that we have sorted sequences, we can discuss Linear Search and Binary Search. Finally, we discuss what to take after CS 1110. Week 143 May (Thursday): Sorting[Handout] [Presentation]
Today we complete our discussion of loop invariants and show how to use them to implement two sorting algorithms: Insertion Sort and Quick Sort. 1 May (Tuesday): Sequence Algorithms[Handout] [Presentation]
Today we continue our discussion of loop invariants (the first page of the handout is from the last lecture's presentation), reviewing Tasks 3 and 4 from the Loop Invariants lecture. Then we introduce framework for building complex algorithms on sequences (strings, lists, etc.). Week 1326 April (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. Reading: Loop Invariants 24 April (Tuesday): NO CLASS - open office hoursNo regular class. open office hours during lecture time instead. Week 1219 April (Thursday): Prelim 2 Review Session[Handout]
17 April (Tuesday): Programming with Subclasses[Presentation]
Now that we have subclasses, there is quite a bit we can do with them. Today we'll look at an in-depth example of a Class hierarchy. Week 1112 April (Thursday): While Loops[Handout] [Presentation]
While-loops are an alternate form of iteration. Sometimes the right iterative tool for the job will be a for-loop, sometimes it will be a while-loop. So it's good to be familiar with both! Reading: Section 7.3, 7.4 10 April (Tuesday): Subclasses and Inheritance[Handout] [Presentation]
Today we learn the ins and outs of inheritance: creating classes that are subclasses of existing classes. Subclasses inherit methods from their parent classes, but they can also override these method definitions with their own definitions when appropriate. Reading: Chapter 18 Week 115 April (Thursday): SPRING BREAKThere is no class today. 3 April (Tuesday): SPRING BREAKThere is no class today. Week 1029 March (Thursday): Using Classes Effectively[Handout] [Presentation]
In previous lectures, we learned the syntax for defining classes. Today we look at the design philosophy for creating classes. Reading: Chapter 17 27 March (Tuesday): 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: Chapter 15 Week 922 March (Thursday): More on recursion[Handout] [Presentation]
Delving deeper into how to write a recursive function, what the call stack looks like, and a few mathematical examples. 20 March (Tuesday): Recursion[Handout] [Presentation]
Today we talk about recursion! Reading: Sections 5.8-5.10 Week 815 March (Thursday): Nested Lists, Tuples, and Dictionaries[Handout] [Presentation]Lists can contain lists, creating two-dimensional structures. A tuple is another built-in type: an immutable sequence of values. Dictionaries are collections of key-value pairs. Reading: Sections 11.1-11.5, 12.1-12.3 13 March (Tuesday): NO CLASS - open office hoursNo regular class. open office hours during lecture time instead. Week 78 March (Thursday): Optional Coding Session
6 March (Tuesday): Iteration and 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. Reading: Sections 4.2, 10.3 Week 61 March (Thursday): Lists (and Sequences)[Handout] [Presentation]A list is a sequence of values that can be of any type. A list of integers could hold a student's lab grades. A list of strings would be appropriate to maintain a shopping list for a trip to the grocery store. They are extremely useful! This lecture will show you how to create and manipulate lists, as well as how to draw them. Reading: Sections 10.0-10.2, 10.4-10.6, 10.8-10.13 27 February (Tuesday): Memory in Python[Handout] [Presentation]
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 collection of frames for all currently executing functions). Week 522 February (Thursday): Conditionals and Control Flow[Handout] [Presentation]
We talk about the difference between program structure and program flow. We 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 20 February (Tuesday): FEBRUARY BREAKThere is no class today. Week 415 February (Thursday): Objects[Handout] [Presentation]
We introduce the notion of objects, a new type of data. Objects allow us to go beyond writing functions to organize code and using built-in types to organize data. Objects use programmer-defined types to bundle both code and data into useful and meaningful combinations. Reading: Chapter 15 13 February (Tuesday): Specifications and Testing[Handout] [Presentation]
Writing functions takes a lot of practice and no one writes perfect code on the first try. That is why it is extremely important to test your functions and make sure they are working properly. We will also see why comments are more important than just notes to yourself. Reading: Sections 4.9, 9.5 Week 38 February (Thursday): Strings[Handout] [Presentation]Python really shows off its power when working with text. Today we go into depth about the str type, which is how Python represents text. We show how to cut up text and paste it back together. These techniques will be very important for the first assignment. Reading: Sections 8.1, 8.2, 8.4, 8.5, first paragraph of 8.9 6 February (Tuesday): Defining Functions[Handout] [Presentation]
We learn how to create our own functions and the important difference between a function call and a function definition. Reading: Sections 3.4-3.11 Week 21 February (Thursday): Functions and Modules[Handout] [Presentation]
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 30 January (Tuesday): Variables and Assignments[Handout] [Presentation] We introduce the notion of a variable and how
an assignment statement works. Reading: Sections 2.1-2.3, 2.5 Week 125 January (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. 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.6 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Course Material by: E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, C. Van Loan, W. White |