Open lesson

Mission: two transfer versions

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

Read a Git repository’s state, examine a change line by line and record only a change you understand with a useful message.

Imani expects a comparison in a few fictional minutes. In the practice repository, the last commit has return rows - distinct. The working file has return 0; git status says check.py is modified, with nothing staged. Voss claims “Git already approved” the zero and that your name on an old commit proves your involvement. Mara wants a precise report before the meeting.

Your mission

  1. Say which state contains each formula and whether the new formula is in a commit.
  2. Write the read-only commands to use before git add and explain both diff lines.
  3. Calculate the output for five rows and four IDs with both formulas.
  4. Explain what Git establishes about the change and what it cannot establish about a person.

How to check your work

  • Subtraction is in the last commit; zero appears only in the unstaged working file.
  • git status and git diff show state and lines; no git add has selected the new line.
  • The old formula gives 1, the new gives 0.
  • The text change is established, but the last editor’s identity and intent require further checks.

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.

# Say which state contains each formula and whether the new formula is in a commit.
# Write the read-only commands to use before `git add` and explain both diff lines.
# Calculate the output for five rows and four IDs with both formulas.
# Explain what Git establishes about the change and what it cannot establish about a person.