Exercises
Work directly in your browser, nothing to install. Use Chrome or Firefox on a laptop, in a normal window (not private or incognito).
Save and submit your work
- Press Ctrl+S (Cmd+S on Mac). Without this step the exported file is empty.
- Open the menu (round button with three lines, top right) → Export… → Python → Export notebook source.
- The downloaded file is always called
notebook.py. Rename it, e.g. toexercise00_<lastname>.py. - Submit only this
.pyfile on Moodle before the deadline announced there: Add submission, upload the file, tick the submission statement and click Save changes. Check that the status reads Submitted for grading.
Reloading or closing the tab loses all your edits, even after Ctrl+S/Cmd+S. Only the downloaded file keeps your work, so export often.
Need a break? Save a link to your work
- Press Ctrl+S (Cmd+S on Mac).
- Open the menu (round button with three lines, top right) → Share → Create WebAssembly link. The link is copied.
- Keep the link: bookmark it or paste it into a note. It contains your code, so do not share it. Do not use Create permalink on marimo.app: permalinks are public.
- Later, open the link: your notebook opens on
marimo.appwith all your changes. Export from there as usual.
Optional: keep working in molab, the marimo cloud
Not required. molab is a free cloud service by marimo. It needs a free account (e.g. with GitHub or Google), and then saves your notebook in your own workspace, so you can continue on any device.
- Press Ctrl+S (Cmd+S on Mac).
- Open the menu (round button with three lines, top right) → Share → Create molab notebook, and sign in.
- To submit, export the
.pyfile from molab and upload it on Moodle as usual.
molab notebooks can be opened by anyone who has their link, so do not share it.
Optional: work on your own laptop instead of the browser
Not required. Locally, marimo saves your work automatically. You need two steps, the same on Windows, macOS and Linux, no admin rights.
1. Install uv (once)
macOS and Linux, in the Terminal:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows, in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Then close the terminal and open a new one.
2. Open your notebook
In the terminal, go to the folder with your exported file and run:
uvx --with numpy --with scipy --with pandas --with matplotlib --with wigglystuff marimo edit exercise01_lastname.py
The first start downloads Python and marimo (1 to 2 minutes). The notebook opens in your browser. Stop it with Ctrl+C in the terminal. More details: marimo installation guide.