Open lesson

Mission: write Mara's recipe

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

Write steps precise enough for another person to reach the same result and know when to stop.

The Noctis 01 test is approaching in the story. Mara has four sensor cards: S1 “tested,” S2 “received,” S3 “tested,” and S3-copy “tested.” The last card is a photocopy of S3 with the same identifier. She wants instructions Noor can follow while you are away to report how many different sensors were tested.

Your mission

  1. List the input cards and set a starting count.
  2. Describe, in order, how to check each card's identifier and “tested” label.
  3. Write a clear stopping condition.
  4. Follow your method and explain what happens to S2 and S3-copy.

How to check your work

  • You use four cards and start at 0.
  • You do not count an identifier twice, and count only cards marked “tested.”
  • You stop after checking every card once.
  • You get 2: S1 and S3. S2 was only received; S3-copy is not another sensor.

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.

# List the input cards and set a starting count.
# Describe, in order, how to check each card's identifier and “tested” label.
# Write a clear stopping condition.
# Follow your method and explain what happens to S2 and S3-copy.