Skip to content
Open access

Teaching Loops in Scratch with a Multimodal AI Assistant Tutor

Jul 2026 · European Journal of Contemporary Education and E-Learning · 0 citations · 18 references

Abstract

Mastering loops and repetition is a well-documented source of difficulty for novice programmers in upper primary school, who often “unroll” a repeated action into a long linear stack of identical blocks rather than recognising the repeating pattern and expressing it with a single repeat block. This study reports a between-groups experiment. We examined whether a multimodal artificial intelligence (AI) assistant tutor — one that interprets screenshots of pupils’ Scratch code and replies with Socratic scaffolding rather than with corrections — improves learning outcomes and engagement relative to traditional classroom lesson. Forty pupils aged 11 to 12 were assigned to two intact classes of 20. The first received a standard, teacher-led lesson on loops, in pairs at shared computers using scratch.mit.edu. The second covered the same material; whenever a pair’s script did not behave as intended, the pair captured a screenshot (a “print screen”) of their blocks and submitted it to the multimodal AI assistant tutor, which read the code and replied with a guiding question that prompted the pair to locate and repair the fault themselves. Pairs followed the driver–navigator pair-programming technique on both groups. We measured learning with a matched pre- and post-test on loops and gauged engagement through a short attitude questionnaire and classroom observation. The tutor group scored significantly higher on the post-test and reported markedly greater interest and enjoyment than the traditionally taught group. These findings suggest that multimodal AI tools that read learner code and scaffold through questioning can enhance both achievement and motivation in introductory programming.

Read PDF