S10 · 1 / 20
S10 · Sat, Nov 28, 2026
Check the Boundary
Predict the boundary first, prove that exact equality counts, and verify the same threshold in a fresh Trail run.
S10 · 2 / 20
Two journeys, one mission
Explorer Journey: the Weather Reader checks the engine from S09's story. Python Journey: write and test the comparison. Today is step 10 / 30.
This is a fresh package and Trail run. The story continues; S09's count does not persist.
S10 · 3 / 20
Today in Python: comparisons and assertions
Define at_goal(count, goal), return a Boolean comparison, reason about boundary cases, and keep three assertions as executable evidence.
S10 · 4 / 20
Review function + return
def at_goal(count, goal):
return FalseA function receives count and goal. return sends one value back. The starter's placeholder is runnable but intentionally wrong.
S10 · 5 / 20
Prediction gate: three nearby values
Before seeing the operator or running code, write True or False and explain why:
goal - 1 → ______ because __________________
goal → ______ because __________________
goal + 1 → ______ because __________________Show all three predictions before continuing.
S10 · 6 / 20
Reveal the inclusive comparison
count >= goalRead it as “count is greater than or equal to goal.” The equality bar matters: the exact goal counts as enough.
S10 · 7 / 20
Write at_goal(count, goal)
def at_goal(count, goal):
return count >= goalKeep it to one readable return line. The comparison itself evaluates to either True or False.
S10 · 8 / 20
Run and compare with your prediction
python lessons/sessions/s10/student/starter.pyFalse
True
TrueFor goal 3, the calls test counts 2, 3, and 4 in that order.
S10 · 9 / 20
Why exact goal counts
2 >= 3 → False
3 >= 3 → True
4 >= 3 → TrueCount 2 is one short. Count 3 is exactly enough. Count 4 is above the same boundary—there is no second or hidden threshold.
S10 · 10 / 20
Keep three assertions
assert at_goal(goal - 1, goal) is False
assert at_goal(goal, goal) is True
assert at_goal(goal + 1, goal) is TrueA passing assertion is silent. Together, the checks preserve evidence below, at, and above the boundary.
S10 · 11 / 20
Deliberate bug: change >= to >
return count > goalPredict which assertion will fail, then run. Keep the three assertions unchanged so they can expose the bug.
S10 · 12 / 20
The exact-goal assertion fails
With >, count 3 is not greater than goal 3, so at_goal(3, 3) returns False. The assertion expecting True raises AssertionError.
The goal−1 and goal+1 results still match. That is why testing the boundary itself is essential.
S10 · 13 / 20
Restore the intended rule
return count >= goalRerun until all three prints match your predictions and all three assertions pass silently. Explain what the equality bar repaired.
S10 · 14 / 20
Python → YAML → Trail
- Python locally models and tests the boundary rule.
- YAML declares the counter goal, links the Weather Reader to that counter, and stores two response messages.
- Trail starts fresh, owns the interaction count, and evaluates the same-package counter's authored goal. It never imports student Python.
S10 · 15 / 20
Validate and launch
explore-package validate lessons/sessions/s10/student/explorer-packageexplore-package trail examples/explorer-packages/nova-character lessons/sessions/s10/student/explorer-package --player "nova-character:nova" --mission-id "compare-a-counter-to-its-goal" --name "S10 Check the Boundary"Use these exact one-line commands from the Course Kit folder. Fix validation errors before launching M13.
S10 · 16 / 20
Weather Reader: below goal
Speak to the Weather Reader before charging the engine. It displays the YAML when_below_goal response.
Talking to the NPC does not increment the counter. Record the below-goal response before adding sparks.
S10 · 17 / 20
Charge to the exact goal
At the Storm Engine, press E once per spark until the visible counter reaches 3 / 3. This S10 counter began at zero; it did not remember S09.

S10 · 18 / 20
Weather Reader: at or above
Return to the Weather Reader and speak again. It evaluates the same engine's count and displays when_at_or_above_goal.
No extra threshold exists. Exact equality is enough because the mission rule is inclusive.
S10 · 19 / 20
Responses 2 / 2 completes M13

The HERO is real runtime evidence: both branches were displayed, the engine is at its exact goal, and M13 is complete.
S10 · 20 / 20
Explain your self-review
- Creative choice: “I chose ___ because ___.”
- Python change: “I changed ___, which made ___.”
- Test run: “I tested ___ and observed ___.”
Explain the prediction, the > failure, the restored >=, and which state belongs to Python, YAML, and Trail.
Next: S11 · Require Both Keys · Sat, Dec 12, 2026.