Year 10 GCSE Computer Science students are reading code with loops and conditionals, the point where predictions start going wrong in useful ways. The teacher shares a Replit project of eight short Python snippets through the school-agreed accounts used for KS4 computing. The routine is fixed: read the snippet, fill in a trace table for it in your book, write the predicted output, then run it, and if the prediction missed, write one sentence on why. Snippet five hides an off-by-one error in a range and snippet seven changes a list while looping over it, both chosen because confident predictions fail on them. Students who finish all eight write one snippet of their own designed to catch out a partner's prediction, which previews next lesson.
This page is one of a growing set of PICRAT examples by cell, subject and grade. Page maintained by Andy Perryer.