Lab 13: Knowledge Check
These questions check your knowledge of concepts from this lab. Use the button at the bottom to show your answers once you've attempted them.
-
Data read from a CSV file is always a string, even when the file contains entries that are numeric.
True False -
JSON and CSV are different because... (pick one or more)
- ...JSON files are smaller than CSV files.
- ...JSON files can store lists and dictionaries directly, while CSV files cannot.
- ...they aren't fundamentally different: JSON files are just CSV files with extra formatting requirements.
- ...CSV files are read line-by-line, whereas JSON files can store the same data on one line or split across multiple lines.
-
When setting up a `csv.DictReader`, what do you need to have ready?
- A list describing the names of the columns you will read.
- An empty list to put results in.
- The filename of the file that you want to read from.
- An open file-writer object to write results from the reader.
- An open file-reader object to use as the basis for the `DictReader`.
Table of Contents
- Lab 13 Home
- Part 1: Exercises (start with B notebook)
- CS Research Overview
- Knowledge Check