Practice Lab

Sharpen your code reading, writing, and organization skills across Python, Stata, and R

What are these exercises?

These exercises are designed to make you pay attention to the details that are easy to miss when reading code for the first time — the exact name of a command, the order of its arguments, which options change the behavior, the small syntactic differences between Python, Stata, and R. Getting these details right is the difference between code that runs and code that throws an error.

After each exercise, you will see a 📖 Go to lesson link that takes you to the exact place in the course modules where that concept was first introduced. You can also add items to a Study Checklist to review later.

Exercise types & how to interact

Read & Interpret

You see a code snippet and pick the answer that correctly describes what it does. Click on the option you think is right.

Spot the Bug

A piece of code has an error. Read it carefully and click on the option that identifies the problem.

Reorder Code

Lines of code are shuffled. Click two lines to swap them until the code is in the correct order, then submit.

Fill the Gap

A code snippet has blanks. Type the missing piece into each gap, then check your answer.

Cross-Language Match

Commands from different languages do the same thing. Click a command on the left, then click its match on the right to pair them.

Choose a Topic

Syntax & Basics Variables, types, operators, functions
📂 Data Import CSV, Excel, .dta, APIs
🔍 Data Exploration Inspection, summary stats, plots
🧹 Data Cleaning Missing data, types, transforms
📊 Data Analysis Regression, testing, simulation
🎯 Causal Inference DiD, RDD, IV, matching
📐 Estimation SEs, clustering, panel data
🔄 Replicability & Git Version control, project structure
🤖 Machine Learning Prediction, regularization, trees

Select Difficulty

1 / 8
0%

Session Complete!

You answered 6 out of 8 correctly

0 Correct
0 Incorrect
0 Skipped