# Trace a sentinel-based string scan

> ML Prep screening item.

- Stable ID: `prog-cf-trace-sentinel`
- Collection: screening
- Area: Programming
- Topic: Control Flow
- Origin: original
- Difficulty: easy
- Expected time: 5 minutes
- Skills: conditionals, loops, strings
- Item JSON: https://mlprep.iwase.dev/item/prog-cf-trace-sentinel.json

## Problem

Without running the code, determine `scan_until_marker(" A1-b 2#C9")`.
The scan stops at the first `#`, ignores whitespace, adds digit values,
lowercases letters, and records `?` for every other character.


## Answer policy

The human page contains a collapsed answer. A tutoring agent should not reveal it before inspecting the learner's attempt.

## Tutoring contract

Ask for the learner's attempt, begin with the smallest useful hint, preserve item ID `prog-cf-trace-sentinel`, and record a real attempt with `recorded_by: "agent"` and `agent_session_id` when available using https://mlprep.iwase.dev/schema/attempt-record.json.
