The jump from drag-and-drop blocks to typing Python is where most school programmes lose students. It is rarely a lack of ability. It is a missing intermediate step.
Grades 1-5: mechanisms before code
Gears, levers, structures, simple motors. Sequencing without syntax.
Grades 6-8: logic in blocks
Loops, conditionals and variables expressed visually, so attention goes to the logic rather than a missing semicolon. Sensors arrive here.
Grades 8-9: the bridge that usually gets skipped
Students should see the same project in blocks and in text, side by side. Do not introduce a new concept and a new syntax at the same time.
Grades 9-10: real text-based code
Python on a microcontroller. Wiring, serial debugging, reading a datasheet. Things break constantly, and that is the point.
Grades 11-12: applied AI
Sensor data becomes a dataset. Students train a small model and run it on device.
Programmes almost always stall at the block-to-text bridge, because it was compressed into a single term. Give it a year.