Open lesson

Mission: avoid a false match

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

Compare values using the right signs and convert numeric text only when you know what it represents.

Imani compares three Noctis 01 case notes. A has '5' for cards received; B has 5 for cards expected; C has door code '005'. A fourth hard-to-read note seems to say '5?'. Voss claims all four mean the same thing. Imani wants an answer a ten-year-old could check step by step.

Your mission

  1. Compare A and B directly in Python, then after a justified conversion of A.
  2. Explain why C stays text and why '5?' must not be forced into a number.
  3. Write a question with >= asking whether received cards reach the expected count.
  4. Give a limited conclusion and name a source check.

How to check your work

  • You predict '5' == 5 is False and int('5') == 5 is True.
  • You keep '005' as an ID and '5?' as doubtful text to check.
  • You write int('5') >= 5 and get True if A really counts cards.
  • You say equal counts prove neither authorization nor independent documents.

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.

# Compare A and B directly in Python, then after a justified conversion of A.
# Explain why C stays text and why `'5?'` must not be forced into a number.
# Write a question with `>=` asking whether received cards reach the expected count.
# Give a limited conclusion and name a source check.