Year 8 have started writing Python and often misjudge how many times a loop runs. The teacher shares one Google Doc per student through Google Classroom, holding three short programs with an empty trace table under each: a while loop that counts down from 5, a for loop using range(1, 6) that adds to a running total, and a loop with an if statement that counts the even numbers in a list. Students work through each program without running it, adding a row to the table every time a variable changes and writing the final output underneath. The teacher circulates, asking students to point to the line that changed a value, then marks the tables after the lesson and opens the next one with whichever error turned up most often.

Tools: Google Docs Nine ideas for your own version in Generate

This page is one of a growing set of PICRAT examples by cell, subject and grade. Page maintained by Andy Perryer.