Prepare the task

  1. Create a class in the “Council” format, or pick “Council” from the lock menu on a single cell. The lock appears when the “Edit cells” or “Run code” rule is reserved for the teacher, as in the “Lecture” format. In a room where everyone can both edit and run code, there is no lock.
  2. In shared cells, prepare the data, the imports and the task statement.
  3. Run the setup code so the values you need are in the kernel.
  4. Open the task cell: each participant gets their own sheet.

The Council format differs from Lecture in what opening a cell does. All other permissions can be set separately.

Students answer separately

Answers are stored on the server, separately from the shared document. A student writes their own version (up to 8,000 characters) and presses “Submit” or / Ctrl + Shift + Enter. “Edit” takes a submitted answer back into work, and “Restore” resets the sheet to the original task. Until the teacher shows an answer, each participant sees only their own work, while the teacher sees both submitted answers and drafts. If an attempt fails with an error, the student can press “Ask the oracle”: only they and the teacher see the reply, and the question counts toward the oracle limit.

Who runs attempts is set in the console's rules: Only me (the default), Everyone in turn or On request. The room's “Run code” rule does not by itself let anyone run Council attempts. In every mode, attempts run one after another in the room's single kernel.

Council rules

Council rules are set for each cell in the console window. Its header sums them up in one line, for example “Runs by me only · each run capped at 30 s · on screen with names”. To change a rule, press Rules, any value in that line, or the G key. Changes take effect at once; there is no Save button.

RuleOptionsWhat it means
Who runs code“Only me” (default), “Everyone in turn”, “On request”Students write the code and you run it; a student runs their own attempt; a student asks and you approve that exact version of the code. Changing the mode drops pending requests.
Run limit5 s, 15 s, 30 s (default), 1 min, 5 min, “No limit”If an attempt runs longer, the server interrupts it and the queue moves on. The limit applies to your own runs too. A new limit takes effect at once for waiting attempts and for the one that is running, counted from when it started. Below the options you can see how long runs of this cell usually take.
Rerun pause“Right away” (default), 15 s, 30 s, 1 min, 2 minHow long a student waits after their run finishes before they can run again or ask for a run. The pause does not apply to the teacher. If only the teacher runs code, this rule has no effect.
On the class screen“With names” (default), “Without names”Without names, a shown solution is labeled with a number, such as “Variant 12”, the same way in everyone's notebook and on the projector.

When the limit stops a run, its output shows “Stopped: the run took longer than …”, and the console marks it “Stopped: longer than …”. An interrupt cannot stop every kind of code. If an attempt does not stop, the console says “not stopping — interrupt it or restart the kernel”. During the pause, the student sees a countdown, “Run in …”, instead of the button.

Running on request

The student presses Run (or Shift + Enter) on their sheet; in this mode, that sends a request to the teacher. While the request waits, the button is replaced by “In queue” with a “cancel” link; if it is declined, the student sees “The teacher did not run it. You can press again.” A student can run or request a run only before submitting: a submitted answer has no run button, and it comes back after “Edit”. Editing the text withdraws the earlier request, so the new version needs a new one.

In the console window, requests are collected on the Queue tab under “Waiting for your approval”. The link “N awaiting approval →” appears next to the tabs, and in the work list such work is marked “Run requested”. Check the code and press Approve or Decline; Approve all approves every pending request at once. Approval puts the version you checked into the shared queue; no code runs before approval. A request does not count as submitting the answer. Changing who runs code or closing the Council drops the requests.

Discuss the answers with the group

You review work in a separate console window. Under the Council cell, the teacher sees only a counter (“N submitted out of M”, drafts) and the Console button. Do not put this window on the projector: it shows names, drafts and marks. If the browser did not open the window, allow pop-ups for this page. On the Work tab, the list of submissions is on the left: newest first, with three or more identical answers folded into a group. The selected work opens on the right. You can run it, mark it Correct or Revise, write to its author or to the whole group, and press Show the class. The code then appears under the cell for everyone as a labeled block, and the cell's own text does not change. Clear the screen takes it down. The author sees your mark (“✓ Correct” or “✗ Has an error”) and your messages under their sheet. The “Class Oracle” tab prepares a summary of the submitted solutions if the oracle is set up.

Keys in the console window: J / K or / move to the next and previous work, Space expands a group, / Ctrl + F searches by name, Enter shows the work to the class, R runs it, 1 marks it “Correct”, 2 marks it “Revise”, 3 clears the screen, / move to the neighboring work in the same group, G opens the rules, and ? lists all keys.

What stays shared

For example, changing a shared table in place affects the next attempt. For a class exercise, it is better to work on a copy:

# df was prepared by the teacher
local_df = df.copy()
local_df = local_df.dropna()
print(local_df.shape)

Copying keeps an ordinary exercise tidy, but it does not create a technical security boundary. Independent grading, tamper protection and identity checks need a separate system.

A format that works in class

Start with a short question, give time for individual answers, pick two different approaches and show them one after the other. Then bring the explanation back into the shared notebook and save the final correct version. Publishing the notebook does not export everyone's personal answers.