Episode 7: The Numbers Deck
Programming with Python · Tutorial 07
The investor liked last week’s numbers. Now she wants a one-page metrics deck: totals, a per-zone breakdown, the busiest day, the strongest zone. Tobi’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 (recommended): runs entirely on your machine, in this tab: no account, no installation, and after it loads no internet is needed.
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: press Cmd/Ctrl+S, then menu → Download → Download Python code. Without the save, the file is empty or misses your last edits. 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: labs are not graded and nothing is handed in. The downloaded .py is your 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.
The install from this session
In Session VII we also install uv, Zed and Mistral Vibe together in class, because from Session VIII the labs run on your own laptop. Missed it? Do it at home before Session VIII: first the uv guide from the top through Adding packages, then the six steps under AI inside Zed on the AI Tools page. The last step is the check we did in class.