M, F 2:30-3:20
CS 1133: Transition to Python
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.
11 October (Friday): Numpy and Scientific Computing
Lab 5: Subclasses
7 October (Monday): Exceptions and Error Handling
Last week we saw how to create errors. This lecture we saw how to recover from them, using the try-except control structure. Because of how Python handles errors, this required a bit of understanding of subclasses.
4 October (Friday): Subclasses and Inheritance
This class completed our discussion of object oriented programming in Python. We saw how subclassing works in Python, and how we can use it to make relatively complex programs.
Lab 4: Blackjack
30 September (Monday): Advanced Class Design
Today we continued Friday's lecture with even more OO programming in Python. We learned about asserts, and how to enforce preconditions. We combined this with properties to show how to enforce class invariants.
27 September (Friday): Classes
Today we covered the basics of OO programming in Python. We learned how to write a class definition complete with methods, and how to add attributes to an object (or to a class). We also learned a little bit about the mysterious built-in methods of Python
Lab 3: Lists and Control Structures
23 September (Monday): Control Structures
Today was a whirlwind day as we learned how to use every major control structure in Python: if, while, and for. In particular, we saw that for-loops are very different in Python than in other languages.
20 September (Friday): Objects and Lists
Lab 2: Modules and Testing
16 September (Monday): Specifications and Testing
Today we talked in more detail about specifications and why they are important. In addition, we showed how to construct unit tests using the cornelltest module. This will be important for the first assignment.
13 September (Friday): User Defined Functions
Today we showed how to create your own modules and define functions in Python. We also showed off the Python Tutor (see link on web page), which is a great way to visualize Python code.
Reading: Chapter 3, Sections 6.1-6.4
Lab 1: Modules and Objects
9 September (Monday): Strings, Functions and Modules
Reading: Chapter 8 (not 8.6, 8.11)
6 September (Friday): Expressions and Variables
The first class was sort of a "jam session", trying out Python. We learned how to start up Python, and play with expressions and variables. We also learned the basic types of Pythons, and why types are important.
The slides attached are actually a "summary" of all the things we covered. We decided that this is the approach we want to take to the course in general. While each day will have a theme, we will talk about whatever anyone wants to talk about, and then we will post summary slides after the class.
Reading: Chapters 1 and 2