Episode 7 — The Numbers Deck

Programming with Python · Tutorial 07

The investor liked last week’s honest numbers. Now she wants a one-page metrics deck: totals, a per-zone breakdown, the busiest day, the strongest zone. Kevin’s counter-proposal, a 40-tab spreadsheet with a formula pointing at a workbook he can’t find, is gently disqualified. So this week you learn the tool that turns a pile of orders into metrics without a single hand-written loop: NumPy. You’ll build arrays, multiply a whole price list in one expression, use boolean masks to count and filter, and total a 2-D grid by row or by column with axis.

Work on the notebook

Open in browser Open in molab

Open in browser (recommended): runs entirely on your machine, in this tab: no account, no installation, and after it loads no internet is needed.

ImportantHow your work is saved (read this once)

Your progress lives in this browser tab. If you reload the page (Cmd/Ctrl + R) your work is still there. But if you close the tab and open the link again later, you start from a clean notebook. There is no cross-device sync in the browser, and clearing browser data or private mode also wipes it.

So: download your .py before you leave (menu → Download → Download Python code). That download is the only guaranteed copy. Handing in files works exactly like this in the checkpoints, so you get to practice the motion every week. Note: a downloaded .py is for submission and backup. You can’t upload it back into the browser editor.

Open in molab: marimo’s free cloud (account required). Your copy saves to your account and reopens on any device. Choose this if you know you’ll switch computers or want to be certain nothing is lost. Optional: nothing graded ever requires it.