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
You see a code snippet and pick the answer that correctly describes what it does. Click on the option you think is right.
A piece of code has an error. Read it carefully and click on the option that identifies the problem.
Lines of code are shuffled. Click two lines to swap them until the code is in the correct order, then submit.
A code snippet has blanks. Type the missing piece into each gap, then check your answer.
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
Select Difficulty
Session Complete!
You answered 6 out of 8 correctly