M, W, F 12:20-1:10
in Upson 142

CS 1133: Short Course in Python

Spring 2019

Lecture Summaries

As we said, our goal is to keep the lectures short this semester. No lecture will be more than 10-15 minutes; the rest of the class will be filled with in-class activities. However, we will always post the what lecture materials we do have here.


Week 7

8 March (Friday): Finishing Up

Demos
point.py
timer.py
worker.py

Presentation      

Originally, I wanted to talk about how specifications worked with classes. But it is clear from Wednesday's class that this is not going to work this semester. We are still posting the slides for our original plan, but this day will be spent all on Assignment 2 and completing the course.



6 March (Wednesday): Classes

Demos
example.py
example2.py

Presentation      

A class is the type of object. To make your own objects, you need to create a class. Today we see how to do this.

Reading: Chapters 15, 16



4 March (Monday): Nested-Lists

Demos
matrix.py
weather.py
weather.json

Presentation      Activities

Lists can contain any values. They can even contain other lists. This allows us to create tables and work with spreadsheet files. This will set us up for the second assignment.



Week 6

1 March (Friday): Objects

Demos
pfuncs.py

Presentation      Activities

Objects are a data-type that function a little like dictionaries. While they are not as flexible as dictionaries, they have many extra features that them much more powerful. Today we see the trade-off between these two types.



27 February (Wednesday): Dictionaries

Demos
grader.py

Presentation      Activities

Today we introduce a new data type: dictionaries. Dictionaries kind of look like lists, except that we access their elements differently. They are also one of the powerful data-types in Python, allowing us to work with very rich data sets.

Reading: Chapter 11



25 February (Monday): For-Loops

Presentation      Activities

Lists come with their own special control structure: the for-loop. Today we see what for-loops can (and cannot) do to make more interesting programs.

Reading: Sections 8.3, 8.7, Chapter 10



Week 5

22 February (Friday): Lists

Presentation      Activities

Now that you are an expert of string slicing, we introduce another sliceable data type: lists. Lists behave just like strings, except that they can contain data other than text.

Reading: Sections 10.1-10.2 and 10.4-10.6



20 February (Wednesday): Debugging

Demos
name.py
flow.py
debug_name.py
test.py

Presentation      Activities

Conditionals make our programs more powerful, but they also make it harder to identify errors. In this class we will talk about debugging strategies set you to work on some buggy code.



18 February (Monday): Conditionals

Demos
flow.py

Presentation      Activities

Today we introduce the conditional, which is our first "control structure". We will see how it allows us to design much more complicated functions.

Reading: Sections 5.1-5.7



Week 4

15 February (Friday): Catch-Up

      

Today is a day to catch our breath and get up to date on all the activities. It is also time to work on the assignment in class.



13 February (Wednesday): Integrated Development

Demos
name.py
stubs.py
test.py

Presentation      Activities

You now know enough to work on the first assignment. However, there are a lot of pieces that have to fit together. Today we give a basic outline of what we want and help you get started on the assignment.



11 February (Monday): Testing Functions

Demos
name.py
test.py

Presentation      Activities

You now know how to write some complex functions. However, writing functions takes a lot of practice and you are likely make mistakes along the way. That is why it is extremely important to test your functions and make sure they are working properly.



Week 3

8 February (Friday): Specifications and Design

Demos
greet.py
name.py
temp.py
commalist.py

Presentation      Activities

You know what a function definition looks like, but how would you write your own function? The answer depends on what you are asked to do, which is why we look at specifications and why they are so important to function design.

Reading: Docstrings in Python



6 February (Wednesday): Function Definitions

Demos
greet.py
plusone.py
temp.py
middle.py

Presentation      Activities

Now that we know how to use functions, we can learn how to create our own functions. In particular, we will learn the difference between a function call and a function definition.



4 February (Monday): Modules and Scripts

Demos
module.py
script.py
interact.py
temp.py
helloApp.py

Presentation      Activities

Today we show how to create our own modules. We also introduce the concept of a script and see how it is different from a module.
This will be a long day. You will have to finish this activity over the weekend.



Week 2

1 February (Friday): Strings

Presentation      Activities

Today we go into depth with the string type, which is how Python represents text. We see how to cut up text and paste it back together. The techniques that we learn will be very important for the first assignment.

Reading: Sections 8.1-8.2, 8.5, 8.8



30 January (Wednesday): Functions

Presentation      Activities

Today we show how call functions in Python. We also introduce the concept of a module and show how modules provide Python with extra (optional) functionality.

Reading: Sections 3.1-3.3



28 January (Monday): Variables

Presentation      Activities

Today we introduce the notion of a variable, and how an assignment statement works. This our first step into real programming.

Reading: Sections 3.1-3.3



Week 1

25 January (Friday): Expressions

Presentation      Activities

Today we introduce types and expressions, which is the bare minimum that you need to do something "useful" in Python.

Reading: Chapters 1 and 2



23 January (Wednesday): Orientation

Presentation      Activities

This first day, we give an overview of the course and its expectations. We will then spend the rest of the class helping you get Python installed on your computers. Remember to bring your laptop!



Course Material Authors: D. Gries, L. Lee, S. Marschner, & W. White (over the years)