WEEK 2: FUNCTIONS

I. Tuesday, January 15

Working with built-in functions and modules

Slides

Code Samples

see course files

Assigned

Continue working on Homework 1 (due Tu, Jan 22)

  1. Option 1: Graphics
  2. Option 2: Audio

Readings and Resources

  1. Python for Everyone: Lists
    Note: we will be covering loops in week 3 (alluded to in Chuck’s reference materials) – as loops and lists go hand in hand – but for now, just focus on what a list is and how it can store and organize data.
    videos | textbook
  2. Python for Everyone: Tuples
    videos | textbook

II. Thursday, January 17

Slides

  1. Slides 04: Creating functions and modules

Code Samples

see course files

Readings and Resources

  1. Python for Everyone: Functions
    videos | textbook
  2. How to Think Like a Computer Scientist: Functions
  3. How to Think Like a Computer Scientist: Modules
    Skim sections 12.1 through 12.4.
  4. What is PIP?

III. Tutorial

This week, we will be working on homework 1 in your tutorial session. If you cannot attend tutorial this week, please submit solutions for the following exercises to Canvas by 6PM Friday evening (see course files):

  1. /lectures/lecture_04/activity_01.py
  2. /lectures/lecture_04/demo02_geocoder.py