18 November 2024

Lecture Code

This code is provided to accompany the lecture. It is not intended to be self-explanatory.

They Told Me I Could Name My Variables Anything

Trace Back

Hand Tracing

Practice

Lecture Practice Problem

Lecture Practice Problem

Write a function reader that reads in a comma-separated value (.csv) file. The argument to reader will be the file name.

The CSV consists of rows:

  • An Index
  • Name
  • Zip Code
  • City
  • State

Return a dictionary in the format:

{Name: [City, State, Zip]}

Use data.csv