Open lesson

Mission: sort receipts before the suspension decision

Command palette

This mission workspace keeps code and notes in this browser tab. Export them before closing it. Running code is practice, not an automatic grade for the mission.

Brief

Create and read a Python list while preserving receipt order and separating copies from new evidence.

Independent investigator Imani asks Mara for an ordered inventory before deciding what she can formally preserve. The table holds R21, R22, and a photocopy of R22, in that order. An original R23 arrives next. Voss wants to announce “four proven departures.” Make the list without hiding the copy or giving it the weight of a new event.

Your mission

  1. Write a list of the first three cards in order, using a clear label for the photocopy.
  2. Give the values at indices 0, 1, and 2, plus the initial length.
  3. Write the action adding R23 and give its new index and the new length.
  4. Explain why four list elements do not mean four independent departures.

How to check your work

  • Your list keeps R21, R22, and the copy of R22 in order.
  • You read indices from zero and count three elements before adding.
  • You use append('R23'), get four elements, and put R23 at index 3.
  • You flag that one of four cards is a photocopy, not a new departure.

Code

Use Tab to leave the editor. Ctrl+Enter runs the source. The lines beginning with # are task reminders. Python ignores them. Write your code beneath them.

Python console

Loading laboratory…

Explore Python or SQL here; this is not an operating-system shell.

This is a disposable browser experiment. The code run here is not recorded as a completed mission.

Each command starts a fresh disposable worker: it runs a captured copy of your current source, then your command with the lesson fixtures. Changes are discarded afterward. Commands never save source or award XP. Ctrl+Enter executes the command.

Virtual workspace files

Source and declarative assets are readable here without JavaScript. Python input files are created at runtime; SQL setup initializes the disposable database.

source.py

Current editor source. Inspection shows your current edits.

# Write a list of the first three cards in order, using a clear label for the photocopy.
# Give the values at indices `0`, `1`, and `2`, plus the initial length.
# Write the action adding R23 and give its new index and the new length.
# Explain why four list elements do not mean four independent departures.