Overview
This week we will finish our discussion of Python's statements for control flow, including branching, looping, and exception handling and begin a topic one of you already requested, functions.
I mentioned in class last Friday that we were ahead of the schedule I had set in the planning calendar. Thinking about it over the weekend I decided that is a good thing, since it will give us extra time to stop and really apply what we've learned after we introduce functions. I've modified the calendar accordingly.
Thursday, September 18th
Classwork
After our quiz on chapter 4, we will discuss Chapter 5: Functions. Since everyone here has programmed before, this topic should not be new, but we will look at some of the Python's function peculiarities, like duck typing and the None value.
Since having functions available transforms the way we can automate testing of our programs, I'll work through the first few doctest exercises with you to illustrate how it they work.
Homework
There are many practice exercises for this chapter. We've scheduled over a week for this chapter in our planning calendar, but we can shorten that if you want to and have more time for PCEP practice.
Complete Exercise Set 0: Chapter Review and Exercise Set 1: Doctest Exercises. By common agreement we'll forgo any quiz next class, but please come to class on Monday ready with questions from your homework.
Tuesday, September 16th
Classwork
We'll begin class by finishing our discussion of Chapter 4: Conditionals, loops and exceptions.
We left off at Section 4.15: Nested Loops for Nested Data. We have only three short sections left, but the last two introduce topics that we will be studying a lot: list comprehensions and exceptions. We will explore exceptions in more detail next chapter.
Homework
Complete all the exercises from chapter 4 and be ready for a short quiz based on these questions at the beginning of class on Thursday.