Dry run on paper simple programs that involve variables and assignment.
Set a series of dry run exercises where students have to step through short fragments of code, working out what they do, on paper. This is an important activity to do after explaining variables and assignment. It reinforces understanding and helps identify faulty mental models so they can be fixed. Being able to do this kind of dry run for any new construct is an important prerequisite to being able to actually write code.
This session comes with linked activity sheets and ‘story’ write-ups that you can download:
- Activity: Assignment Dry Run (Python version) [PDF]
- Activity: Assignment Dry Run (Scratch version) [PDF]
- Activity: Assignment Dry Run (Java version) [PDF]
This activity can be done on its own but naturally combines with the Box Variable activity.