Midterm 2 Practice Problems Release Notes

Practice problems will release along with Notebook 12

The practice problems released are all past exams, except for the extra example problem.

They are all accessible through your LMS and hosted in Vocareum like your notebooks.

The assignment titled "Practice Problems for Midterm 2 - Untimed" contains all of the past exams we're sharing with you.

There is also a "Practice Timed Exam for Midterm 2" which is the most recent past exam, and it is setup like a test in Vocareum (with time limit), without the proctoring.

-- Note:* as you access that assignment through your LMS, there's a note about how we recommend using it and a couple of "watch outs".

The information listed below gives you a quick intro to the notebooks.


NOTE ON NEW EXAM FORMAT -- PLEASE READ!!!

Prior to the Fall 2024 semester, most problems were written to be able to be solved with either Pandas or SQL, with varying levels of difficulty,

Students had the choice, when taking the exam, which one to use to solve each exercise.

Starting with the Fall 2024 MT2, each exercise specifies that you use either Pandas, or SQL.

The exercises are now written so that students must solve them using the specified manner (either Pandas or SQL).

This requirement means students need to prepare for both in order to answer all of the exercises.


The Midterm 2 for Fall 2024 and is the only full exam below that implements this change.

In addition, we put together the PMT2-EX1 below for a short example of how the exercises are formatted.

If students have any questions on the execution of this new format, please ask in Piazza.


Suggestion 1: while we're releasing all of the solutions with the notebooks, we recommend you don't use those until you finish the whole practice exam, or if you get stumped on an exercise for an extended period of time.

Learning how to resolve and hunt down those issues on your own is the skill you need to build in order to prepare for the exam.

Suggestion 2: You're free to discuss these practice exams openly and share your code with classmates.

Connecting with others on Piazza may help you think through alternative approaches to problems.


Special Example Exam: PMT2-EX1(MT2 SQLite and Pandas) Official Solution

  • Note: this is a quick demo created to show you what Pandas or SQL-only exercises look like
  • Topic: Star Wars
  • Key skills: SQL, Pandas

PMT2-FA24

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

  • 10 exercises; 17 available points; 12 points required for 100%; Time limit 4 hours
  • Topic: Netflix and Bills. In this notebook you will evaluate whether there is a relationship between the programming that is distributed by Netflix and the financial performance of the firm.
  • Key skills: General Python', Tabular Data, Pandas, SQL and SQLite, NumPy

PMT2-SP24

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

  • 7 exercises; 13 available points; 7 points required for 100%; Time limit 4 hours
  • Topic: NYC Roadmap - Traffic fatality density. In this notebook you will look through some NYC traffic data to build a KDE model.
  • Key skills: SQL, Pandas, Numpy

PMT2-FA23

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

  • 9 exercises; 21 available points; 13 points required for 100%; Time limit 4 hours
  • Topic: "Punt, Kick, or Go for it?". In this notebook you will look through some NFL play results and create a risk/reward model.
  • Key skills: Pandas, Numpy

PMT2-SP23

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 11 exercises; 21 available points; 12 points required for 100%; Time limit 4 hours
  • Topic: "Better Reads". In this notebook you will look through user-generated book reviews to uncover "communities of users".
  • Key skills: SQL, Pandas, Numpy

PMT2-FA22

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 9 exercises; 19 available points; 12 points required for 100%; Time limit 4 hours
  • Topic: Capturing Data Changes for Slowly Changing Dimensions. In this notebook you will implement a common data engineering paridigm to maintain a historical record of some mock-up business data.
  • Key skills: Manipulating tabular data with Pandas and SQL, Strings
  • Note: Most exercises in this notebook are solvable with Pandas or SQLite. However, the solutions using SQLite need to be "massaged" to pass all of the test cells. Pandas is strongly recommended.

PMT2-SP22

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 9 exercises; 17 available points; 12 points required for 100% (lowered from 14); Time limit 4 hours
  • Topic: Actor network analysis. In this notebook you will explore a dataset of film credits and create/analyze a relationship network of actors starring in the films.
  • Key skills: Pandas, native Python data structures, and incorporating new tools given appropriate documentation.

PMT2-FA21

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 7 exercises; 13 available points; 9 points required for 100%; Time limit 4 hours
  • Topic: Campaign finance geography. In this notebook you will calculate how similar ZIP codes in the United States are to one another based their residents' donations to political candidates in the 2020 election cycle.
  • Key skills: Pandas, SQLite, sparse matrices

Updated: 2025-03-04