Episode 4 — The Menu Grows Up
Programming with Python · Tutorial 04
The menu outgrew Kevin. Last week he tracked prices in seventeen loose variables (price1, price2, and the infamous price_final_FINAL2) and nobody could find anything. In this notebook the data finally gets a shape: you’ll queue orders in a list, map dishes to prices in a dictionary, count unique regulars with a set, reach into nested dictionaries, and re-price the whole menu in a single comprehension. It ends with a courier run across campus — Kevin’s forgotten Falafel Wrap has to reach the dorms before it achieves sentience.
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 (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.