×

Working with Marimo

← MATH4120 Home

Every computing lecture and lab in MATH4120 is built as a Marimo notebook — a live, reactive notebook that runs entirely in your web browser. There is nothing to install and nothing to sign up for: click a “View” or “Run” button on the home page and the notebook loads on the spot, on a lab PC, your own laptop, or even a tablet.

View, Run, and Lab — what's the difference?

Each chapter offers up to three ways into the same notebook:

Starting a notebook: the first click

This part only applies to Run and Lab pages — View is already a finished snapshot with nothing left to run.

  1. Wait for it to load. A Run or Lab page is starting up a real Python interpreter inside your browser tab from scratch, so the first load can take several seconds — sometimes 10–20 on a slow connection. You'll see a loading indicator. This is completely normal: don't refresh the page or click away, just wait for it to finish.

  2. Click the run-all arrow. Once it's loaded, you'll see the notebook's code, but the plots won't have appeared yet. Look in the bottom-right corner of the page for a ▶ (play/run-all) button and click it once. This runs every cell in the notebook from top to bottom and is the one manual step you need — after this, every plot should appear.

After that first click, Marimo is reactive

You won't need to press a “Run cell” button again. Change a slider or edit a cell, and every cell that depends on it updates automatically — like a spreadsheet, not a script you run top to bottom. The run-all button is only for that first click after the page loads (or if you want to reset everything and start again from scratch).

If something looks wrong

A red error box is normal — it's not the notebook (or you) being broken

If you edit a cell and see a red box with some Python text in it, that's just an error message — the same thing a professional programmer sees dozens of times a day. Read the last line of the message first; it usually says exactly what went wrong (a typo, a missing bracket, the wrong variable name). Fix that one thing and the cell will re-run automatically. This is a normal, expected part of writing code, not a sign you've broken something.

If the page ever seems properly stuck — nothing responds, a plot never appears, the loading indicator spins forever — the fix is almost always just to reload the page. Since nothing in the browser version is saved anyway (see below), there's nothing to lose by starting fresh.

The one thing this browser version can't do: save your work

Nothing you type or change in the browser version is saved anywhere

Refresh the page, close the tab, or lose your Wi-Fi, and any edits you made inside a “Run” or “Lab” notebook are gone. There's no file being written to your computer and no account keeping a copy.

That's fine — even by design — for what Marimo is for here: following a live lecture, playing with a slider to build intuition, or trying an idea in a lab session before you commit to it. It is not a place to do work you need to keep, and it is not how you submit anything.

This is a limitation of the no-install, browser-only version specifically, not of Marimo itself — installed locally, Marimo can save real files just like Jupyter can. We use Jupyter for that side of things because it's the more established, widely-taught tool for saved, submittable work — not because Marimo is incapable of it.

For a lab exercise you want to finish properly, or for an assignment you need to hand in, you'll work in an actual saved file instead — a Jupyter notebook (.ipynb) that lives on your computer (or a shared drive), which you can close, reopen, and eventually submit. See Working with Jupyter notebooks for how to get that set up, on a campus PC or your own laptop.

Quick reference

You want to…Use
Follow along with a computing lectureRun
Revisit a lecture while revisingView
Work through a lab worksheetLab
Finish a lab exercise properly, or do an assignmentJupyter (see next guide)

Tools used here

← Back to home · Next: working with Jupyter notebooks →