MODULE 1.1

READING:

  1. httlads Chp 4

  2. Corey Schafer Beginner Tutorials (Videos 1 to 21)

  3. Corey Schafer Comprehension Tutorial

You can skip any chapter or video if you already are familiar with the concepts therein. This should mostly be a review of concepts you already know.

TASK:

  1. Do P-Set 1

MODULE 1.2

READING:

  1. thinkcspy: Chp 11.1-11.4

  2. Why should we close files?

TASK:

Download the .zip folder here and unzip it. Do not change the folder structure (do not move files around in the folder to tackle this task)!

  1. Fix all file paths in the .py script so that they reference the correct databases.

  2. Using the method detailed in Chp 11.4, open the file referenced in filepath2, then:

    1. Ensure that the UnicodeDecodeError does not occur. (Hint)

    2. Print the names of all players in the file, with “Name: “ preceding each name. In each line of the output, it should look like “Name: John Doe” etc. (Hint)

Submit your task in a .zip or .7z compressed file with the original folder structure. (The only modification should be to the .py script)

P-Set 1

Remember to document your code well. Report all results in a LaTeX-rendered PDF document. Submit your .py file and your .PDF file in a single compressed folder (.7z, .zip, or .rar). Do not include the QJE files or the Opportunity Insight files.

TASK:

  1. Download the PDF files at https://drive.google.com/file/d/1h9U7bC08KCZv8hlFCbnZL_NUfyc16ALc/view?usp=sharing. Create a Python script in the same folder as the PDF files.

  2. A coauthor finds the underscores “_” extremely ugly. In the Python script, rename all files to remove the underscores and replace them with spacebars.

  3. Download the Opportunity Insights data on colleges and outcomes at https://drive.google.com/file/d/1YqII3eFlFpfwLClLyGwJk4EIukoqIstM/view?usp=sharing.

  4. Import the CSV in the Python script as a Python dictionary. Download the codebook at https://opportunityinsights.org/wp-content/uploads/2018/03/Codebook-MRC-Table-1.pdf to understand the variables. (Hint: use set comprehension)

  5. Using comprehension, delete all schools with a count of less than 100.

  6. Print every school in Texas and their mobility rate, separated by line for each school.

  7. Write a new CSV with the semicolon delimiter (;) and with the state variable removed based on this new data.