Next Article in Journal
MindVoice: A Web-Based Multi-Dataset Speech Depression Screening System with Pipeline-Aware Grad-CAM Explainability
Previous Article in Journal
Collaborative Federated Learning to Secure 6G-IoT with Deep Convolutional Generative Adversarial Network
Previous Article in Special Issue
Future Trends in Computer Programming Education
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Exploratory Mixed-Methods Study of Sixth-Grade Primary School Students’ Problem-Solving Strategies and Difficulties with Loops in the Educational Programming Game Rapid Router

by
Andreas Giannakoulas
and
Stelios Xinogalos
*
Department of Applied Informatics, School of Information Sciences, University of Macedonia, 156 Egnatia Street, GR-54636 Thessaloniki, Greece
*
Author to whom correspondence should be addressed.
Computers 2026, 15(10), 645; https://doi.org/10.3390/computers15100645
Submission received: 23 July 2026 / Revised: 16 September 2026 / Accepted: 19 September 2026 / Published: 23 September 2026
(This article belongs to the Special Issue Future Trends in Computer Programming Education, 2nd Edition)

Abstract

Educational games are widely used to introduce programming concepts and foster computational thinking skills among young learners by offering engaging and interactive environments that enhance motivation and encourage active participation. However, limited research has examined the difficulties primary school students encounter and the problem-solving strategies they use when learning fundamental programming concepts through educational games. This article presents the findings of an exploratory mixed-methods study involving 34 sixth-grade primary school students and investigates the difficulties and problem-solving strategies observed while learning loops (simple loops, nested loops, and repeat-until structures) through a block-based programming game. An instructor dashboard was used to monitor students’ progress across game levels, while screen recordings were analyzed to identify difficulties and problem-solving behaviors during gameplay. In addition, quantitative and qualitative analyses were conducted on students’ worksheet responses. The findings indicate recurring difficulties in recognizing repeating patterns, using loops efficiently, determining repetition counts, coordinating inner and outer repetitions, and managing longer command patterns. Students also demonstrated orientation errors and frequently relied on sequential commands and trial-and-error when constructing their solutions. The analysis also showed that students adopted different problem-solving approaches when constructing solutions across the three loop types. Additionally, several game design features appeared to be associated with some of the observed difficulties and problem-solving behaviors. These findings provide insight into students’ problem-solving processes when learning loops through educational programming games and may inform the design and instructional use of such environments.

1. Introduction

Computational thinking (CT) was originally presented by Papert [1,2] in the context of using programming as a means for thinking and learning [3]. Later, Jeannette Wing [4] popularized CT by defining it as an essential skill required for everyone in today’s digital society, not just computer scientists [4,5]. Since then, CT has gained widespread recognition as a fundamental skill that encompasses logical reasoning, problem-solving, abstraction, and algorithmic thinking [4,5,6].
As it is increasingly acknowledged as a critical skill for the twenty-first century, CT has been incorporated into national curricula of many countries [7,8,9] frequently beginning its implementation at the primary education level [6,10,11]. Additionally, recent studies demonstrate that early development of CT can be positive for young children, including those in primary school [3,8], as it gives students the skills they need to succeed academically and professionally in today’s technologically advanced society [12,13].
One of the most common approaches adopted for promoting CT is learning through computer programming [9,12,14,15,16], as programming activities offer a real-world setting where students can cultivate critical CT abilities, including problem-solving, abstraction, and algorithmic thinking [17,18]. Due to its abstract nature and cognitive demands, programming is widely acknowledged as a challenging topic for novice programmers [19,20,21,22], particularly for those in primary education [23]. Primary school students frequently struggle with programming because they lack the abstract thinking skills necessary to comprehend important programming concepts like algorithms and control structures [23].
Computer science educators widely recognize abstract thinking as an important ability for learning computer science, and particularly for developing programming skills [24,25]. The importance of abstract thinking in programming can also be considered from a cognitive-developmental perspective. According to Piaget’s theory of cognitive development, children between approximately 7 and 11 years are considered to be in the concrete operational stage, in which they develop logical reasoning but continue to rely largely on concrete objects [26,27]. At around 11–12 years, children begin the gradual transition to the formal operational stage, during which the capacity for abstract, hypothetical, and systematic reasoning develops [23,26,27,28]. As this transition is progressive rather than immediate, abstract thinking may not be fully developed in all students by the end of primary school [23]. Consequently, children’s level of cognitive development may affect their ability to comprehend programming concepts that require abstraction [23,29]. Thus, the ongoing development of abstract thinking during this period may partly explain some of the difficulties primary school students encounter when learning fundamental programming concepts [23,29].
In order to support students in this transitional period, block-based programming environments, like Scratch, have been widely used in primary education [30] with the goal of preventing the syntactic errors that young students make while using traditional text-based programming languages [31]. By manipulating graphic blocks that represent programming instructions rather than writing code, students can concentrate on algorithmic thinking and program logic while also reducing syntax mistakes [31,32].
To further encourage young students and facilitate the gradual introduction of programming principles through interactive problem-solving tasks, educational programming games have been developed [33,34]. Using educational games in the teaching process can bring many benefits. Recent research indicated that educational games can provide engaging and interactive learning environments that can boost primary school students’ motivation by allowing them to actively practice programming concepts, offering appropriate feedback and support, and providing exercises that are tailored to their needs [35,36]. Furthermore, current research on the use of educational games in teaching programming and CT skills, highlights their significant role in improving learning outcomes and encouraging students’ active participation [22,37,38]. It also highlights their beneficial effects on developing CT skills and improving primary school students’ understanding of basic programming concepts [39].
Despite these advantages, educational programming games do not ensure that students will avoid conceptual difficulties when learning programming. Additionally, few research efforts have examined the particular difficulties young students encounter when utilizing game-based programming tools, underscoring the necessity for more empirical research in this field [35]. Based on a limited body of empirical research (16 studies), we previously investigated the difficulties primary school students faced when learning basic programming concepts through educational games [40]. The results of the study demonstrated that students struggled primarily to comprehend loops, including both simple and nested loops. In terms of game-related components, students struggled to use complex user interfaces, comprehend graphical interface elements that illustrate programming structures, and decode command symbols that represent instructions.
However, while our previous study identified various types of difficulties reported in other studies, it cannot provide sufficient evidence regarding how these difficulties appear during the actual problem-solving process of students. Furthermore, little attention has been paid to the process that students follow when constructing, executing, testing, modifying, and improving loop-based solutions while engaging with an educational programming game. Examining this process and the students’ actions as they interact with the game can reveal various difficulties and highlight the strategies students use to construct their solutions.
In this context, this exploratory mixed-methods study examines both the difficulties that primary school students encounter and the problem-solving strategies they adopt while learning loops in a block-based programming game, particularly simple loops, nested loops and repeat-until loops. This analysis of students’ problem-solving process aims to provide a clearer understanding of how difficulties emerge during programming activities and how their strategies vary across different loop types. Additionally, the study aims to identify aspects of the game design that appear to be associated with students’ observed difficulties and problem-solving behaviors.
Accordingly, the study addresses the following research questions:
  • Research Question 1 (RQ1): What difficulties do primary school students encounter and what problem-solving strategies do they use while working with simple loops, nested loops and repeat-until loops in a block-based programming game?
  • Research Question 2 (RQ2): What features of the game’s design appear to be associated with the difficulties and problem-solving behaviors observed while students work with loop constructs?
By examining these issues, the study hopes to advance knowledge of how young students acquire programming skills and provide guidance for the creation of more productive learning environments that enhance the growth of CT abilities. The rest of this article is organized as follows: Section 2 provides a brief overview of relevant empirical research that demonstrates the challenges that primary students encounter when learning programming through games, while Section 3 describes the study’s methodology and data analysis procedures. In Section 4, students’ challenges are examined through an analysis of both their in-game performance and their answers to the related worksheet. The results are thoroughly discussed in Section 5, Section 6 highlights the implications for researchers and Section 7 emphasizes the limitations of the study. Finally, Section 8 summarizes the findings and offers recommendations for future research areas.

2. Related Work

Prior research has extensively examined how educational programming games support young learners in developing fundamental programming and CT skills, while also identifying significant learning challenges. Early studies with young children indicate that spatial orientation and interpretation of visual programming elements constitute major obstacles. For instance, research using Logo-like environments and games such as Ladybug and Code.org reported that students struggled with orientation instructions and with interpreting graphical symbols representing movement and rotation, often due to limited spatial reasoning abilities [20,41,42]. Similar findings were reported in studies with games such as Crocro’s Adventure, where students misinterpreted movement commands and directional representations [43].
Another frequently reported challenge concerns the comprehension and effective use of loops and repetition structures, which are fundamental programming concepts. Empirical studies using games such as Kodable, Robot Training, BOTS and Run Marco consistently show that students experience difficulties understanding how loops function, recognizing repeating patterns, debugging loop-based solutions, and implementing nested loops [44,45,46,47]. These difficulties often manifest as redundant code or inefficient solutions, suggesting limited conceptual understanding of repetition mechanisms.
Several studies also highlight challenges related to higher-level programming constructs and abstraction, including functions, procedures, and recursive calls. For example, research with the Blockly-based game ChIP showed that younger learners struggled to understand functions and procedures, partly due to the abstract nature and graphical representation of these constructs [48]. Similarly, studies examining multiple programming games found that students had difficulty combining several instructions within a single repetition block and handling long command sequences [49].
Game design features and interface complexity have also been identified as factors affecting learning outcomes. Studies involving games such as sCool, Kodetu, Penguin Go, VR-OCKS, and Minecraft Adventurer demonstrate that overly complex interfaces, rapid increases in task difficulty, additional constraints (e.g., block limits), and time restrictions can hinder students’ understanding of programming concepts and reduce learning effectiveness [15,50,51,52,53]. Moreover, large-scale analyses of game interaction data confirm that tasks requiring the integration of multiple programming structures—such as loops, sequences, and conditionals (simple and double alternatives)—are particularly challenging for learners [54].
Overall, the literature consistently indicates that young learners encounter difficulties with spatial reasoning, abstraction, pattern recognition, and the integration of multiple programming constructs when learning through game-based programming environments. While previous studies identify a variety of learning challenges, relatively few focus specifically on systematically analyzing students’ difficulties with loop constructs and the role of game design features in shaping these challenges, highlighting the need for further empirical investigation in this area.

3. Study’s Method

3.1. Study Design

The research presented in this article was a 6 step process, as shown in Figure 1.

3.2. Procedure

The study presented in this article is a didactic intervention, which was conducted during the school year 2024–2025 in two primary schools of Thessaloniki in Greece, within the “Information and Communication Technologies” (ICTs) course. In the context of the ICT course, 6th grade students are taught basic programming concepts. The didactic intervention took place in the school’s computer lab and 34 6th grade students participated. Each student used a different computer, and data was collected from 34 separate workstations.
Based on a set of predetermined criteria, a number of games were systematically analyzed in order to find one that would be appropriate for the current study. These criteria were selected according to the requirements of the present study and comprised: (1) the availability of a control panel allowing the teacher to create digital classes and to record and monitor students’ progress; (2) the provision of a sufficient number of game levels corresponding to each programming concept under consideration (loops for a predetermined number of repetitions, nested loops, repeat-until structure); (3) The ability to develop new levels, which allows the teacher to modify the educational content to meet the unique requirements of a class; (4) free access to the game.
The games reviewed were the following:
The game “Rapid router” was eventually chosen for this study since it was the only game that met all the criteria listed above. It represents a typical block-based programming game similar to those commonly used to introduce programming to young learners. More importantly, it allows teachers to create custom levels targeting specific programming concepts, which was particularly useful for systematically examining students’ difficulties with simple, nested, and repeat-until loops. The game also records students’ solutions and progress, providing additional data to support the analysis of the screen recordings. Additionally, among the games examined, Rapid Router was the only game that allowed both the teacher and students to design new levels, and provided a teacher dashboard for managing an online digital class. Rapid Router (https://www.codeforlife.education/rapidrouter/ (accessed on 15 September 2026)) is a free, online, block-based programming game designed to align with the UK’s computer science curriculum and introduce children to basic programming concepts. The main objective in each level of the game is for the player to help the driver of a van and guide him along a route in order to make various deliveries. For this purpose, the player must design the proper algorithm, using relevant block commands, and placing them with the drag and drop method in the workspace of a suitable editor. Students can examine important programming concepts including “sequence”, “loops”, “selection structures” and “procedures” through the game’s various levels.
Initially, we developed a teaching proposal centered on selected levels of the “Rapid Router” game, consisting of four detailed lesson plans. Each lesson plan is accompanied by a supplementary worksheet containing instructions for completing the corresponding game levels. Furthermore, for each lesson unit, the teacher utilized the game’s level editor to design and prepare additional game-based activities. Prior to the beginning of each lesson, these custom levels were assigned to students alongside the predefined levels associated with the respective unit, providing students with the opportunity to engage with and solve the newly created content. Moreover, each lesson contains a prepared assessment worksheet with game-related activities that students complete with paper and pencil.
The intervention comprised four lessons, each lasting one didactical hour (45 min), delivered over four consecutive weeks. The content and learning objectives for each lesson are outlined in Table 1. The duration of the intervention was consistent with the Greek primary school ICT curriculum, which allocates approximately six teaching hours to programming. During these hours students are expected to engage with various programming concepts like variables, selection and repetition structures, events, while procedures and procedure calls are also recommended. The present intervention devoted three 45-min lessons specifically to simple loops, nested loops, and repeat-until structures, following an introductory lesson on sequence.
During the first lesson, students were instructed to play levels 1–12 to get acquainted with the game environment and the concept of sequence command execution. Afterwards, at the beginning of each lesson, students were exposed to the unit’s programming concepts via the “Introduction Levels”, created particularly for that lesson by the teacher. They were subsequently given time to explore and play the game levels related to the relevant topics, and finally, they were required to complete the levels the teacher had specifically designed for that unit (Custom Levels in Table 1).
Each student worked independently at their own computer and was not permitted to communicate or interact with classmates. Before beginning the game, students logged into the online “Rapid Router” game application using a hyperlink shared by the teacher, accessing accounts that the teacher had set up for them through the game’s control panel. This allowed the application to track their solutions and progress. After logging in, students received the supplementary worksheet and were then given time to play the game levels aligned with the specific lesson plan.
Students progressed through the game levels at their own pace and did not finish them at the same time. Once a student completed the levels of the unit, they were given the corresponding evaluation worksheet to complete individually in class using paper and pencil. Prior to working on the worksheet, the teacher provided clear instructions to help students understand the expectations of each task. Those who were unable to finish the worksheet during the lesson were given additional time to complete it.

3.3. Participants

Given that the primary objective of this study was to examine the challenges encountered by primary school students in acquiring fundamental programming concepts through the use of an educational game as a learning medium, the research was deliberately confined to participants within this specific age group.
The criteria for participant inclusion in the study were as follows: (1) enrollment in primary school, (2) limited or no prior experience in programming, and (3) current engagement with the Greek national computer science curriculum during the study period. The exclusion criteria were as follows: (1) substantial prior experience with programming, which could affect the learning outcomes, and (2) previous use or familiarity with the Rapid Router game, which could influence the validity of the study’s findings. The study sample comprised 34 students, aged 11 to 12 years, recruited from two elementary schools located within the same geographic area and sharing comparable socioeconomic characteristics.

3.4. Data Collection and Analysis

To gather data for addressing the study’s research questions, multiple complementary sources were used: students’ screen recordings, the game’s teacher dashboard, students’ final solutions, evaluation worksheets, and the teacher’s research diary.
  • The screen recordings captured the process students followed as they composed, executed, and modified their programs, as well as their interaction with the game.
  • The game’s teacher dashboard provided information on students’ progress, the levels they completed, and the score they achieved at each level.
  • Students’ final solutions to the game levels were recorded to determine whether each level was completed correctly and whether the corresponding loop structures were used effectively.
  • The research diary contained observations recorded during the lessons, focusing mainly on the difficulties students encountered and instances where additional assistance or clarification was required.
  • Additionally, the evaluation worksheets completed with paper and pencil and administered after students completed each corresponding section of the game, provided additional evidence regarding students’ understanding of loops.
The analysis followed an exploratory mixed-methods approach combining both descriptive quantitative information regarding students’ performance and qualitative data regarding students’ interactions with the game.
For the quantitative data, students’ final solutions at each level were categorized as efficient, inefficient (but functional), wrong and no solution, and for each category the corresponding number of students was recorded. A solution was considered as efficient when it successfully completed the activity using the same number of commands and the structure as the efficient reference solution of the game (Appendix A). An inefficient (but functional) solution successfully completed the level but may have contained extra or redundant commands or did not use loops effectively. A solution was classified as incorrect when it did not successfully complete the activity. If the student did not provide a solution, it was recorded as “no solution”. Similarly, for each evaluation worksheet, the number of correct and incorrect answers was recorded.
The evaluation worksheets were analyzed quantitatively and for each task the number and percentage of correct and incorrect responses were calculated. Then, a qualitative analysis was performed for the incorrect responses to identify the types of errors that caused them, such as difficulty in identifying a pattern, orientation difficulties, errors regarding repetition counters, difficulties in implementing nested loops. The worksheet results were compared with the screen-recording observations to examine whether similar difficulties were evident across both types of activities.
For the ready-made game levels, solutions’ efficiency was determined based on the game’s scoring system that includes a “route score” and an “algorithm score”. Players receive 10 points for successfully reaching the destination and an additional 10 points for the quality of their algorithm, losing points if the solution includes additional commands than the game’s efficient reference solution. For the teacher-designed levels, the level design editor provided only a “route score” and did not evaluate the algorithm’s quality. Therefore, to evaluate these levels, the solutions were compared to the efficient teacher-designed solutions, using criteria similar to those applied in the game: the required path, appropriate use of loops, number of commands. For the teacher-designed LP4 level, which required students to identify the shortest route, both the selected route and the appropriate use of loops were considered when evaluating the solutions. Specifically, a solution was classified as efficient when it followed the shortest route and appropriately incorporated loops into the code, whereas solutions that did not meet either of these criteria were classified as inefficient.
The classification of a solution as inefficient served as a descriptive measure of solution efficiency rather than an indicator of students’ conceptual understanding of loops. A functionally correct but inefficient solution did not necessarily indicate a lack of understanding of loops. It may reflect an inability to identify a more abstract solution or simply a student’s decision to proceed without optimizing further the solution. Therefore, inefficient solutions were evaluated in conjunction with the evidence from the screen recordings and were not treated as an indication of a lack of understanding loops.
For the qualitative analysis, screen recordings of all students were examined to identify observable difficulties and repetitive behaviors during game playing. Particular attention was given to cases involving unsuccessful attempts, inefficient but functional solutions, incorrect use or avoidance of loop, repetition-count and orientation errors, and repeated code modifications. These cases were subsequently examined in detail, and recurring behaviors across the three loop types were used to develop and refine the difficulty categories. Worksheet responses and the research diary were used to support the screen-recording observations and identify similar difficulties across different activities.
Screen recordings were also used to identify the problem-solving strategies applied by students who provided efficient solutions. For simple loops, the top-down method refers to first constructing the loop and then implementing the repeating pattern. The bottom-up method refers to the case where the pattern is first implemented and then placed inside the loop. Furthermore, in the progressive method, an inefficient functional solution is first given and then gradually the solution is optimized with appropriate loops. The same distinction was applied to nested loops, with top-down approach beginning with the outer loop construction and then the inner repeating pattern and the bottom-up approach beginning from the inner repeated pattern and then constructing the outer loop. The progressive approach referred to producing a functional solution with simple loops and gradually reorganizing it with nested loops. For the repeat-until loop the strategies were loop-first and pattern-first depending on whether the loop or the repeated pattern is first implemented.
The analysis was conducted by the first author, who was also the teacher-researcher who implemented the intervention. To enhance the credibility of the analysis, the second author independently coded a random sample of the data, and any discrepancies were discussed and resolved through consensus. Approximately 10% of the students’ solutions submitted for each lesson were independently coded to provide an additional check on the coding process; no formal inter-coder agreement coefficient was calculated. However, because the first author conducted the primary analysis and was directly involved in the intervention, the possibility of researcher subjectivity in interpreting students’ behavior is acknowledged as a limitation.

4. Analysis of Game Results

The results are presented for each type of loop in the order in which it was introduced during the intervention: simple loops with a predetermined number of repetitions, nested loops and repeat-until loops. For each type of loop, the analysis considers students’ performance in the game activities, evidence from screen recordings, and results from the assessment worksheets. Recurring difficulties across the different loop types are also identified, together with the problem-solving strategies employed by students. Students exhibiting distinctive patterns of behavior are discussed separately.

4.1. Analysis of Game Results for Loops with a Predefined Number of Repetitions

This lesson introduced simple loops with a predetermined number of repetitions, through game’s Levels 19–22, as well as five supplementary instructor-designed levels LP1-LP5. Table 2 summarizes the main characteristics of the efficient solutions for Levels 19–22 and the teacher-designed Levels LP1-LP5, including the number of loops, the number of repetitions in each loop, the number of blocks (commands) within each loop body, and the total number of blocks. The design of each level and its corresponding reference efficient solution are provided in Appendix A (Table A1 and Table A2).
Table 3 summarizes students’ performance across each level on simple loops. Thirty-three (33) students participated in this lesson of the didactic intervention (one student was absent).
Performance was generally high in the initial levels but decreased as the activities became more complex, involving more demanding repetitive patterns and the coordination of repetitions with changes in direction. All the students produced efficient solutions at Level 19, while 31 students did so at Level 20. The number of efficient solutions decreased to 25 at Level 21 and 23 at Level 22. A similar performance pattern was observed in the teacher-designed levels. Most students produced efficient solutions in LP1-LP3, whereas performance decreased considerably at Levels LP4 and LP5. Overall, while most students demonstrated effective use of simple loops, their ability to apply them effectively decreased as the activities became more complex.
Analysis of the screen recordings revealed various forms of inefficient or incorrect use of loops. Representative examples of inefficient solutions are provided in Appendix B (Table A7 and Table A8), while the following text refers to specific students’ solutions that illustrate particular difficulties or errors. Several students relied entirely or partially on sequential commands to construct the solution (Table A7: S2, S20, S21, S30, S31, S34, S33; Table A8: S14, S17, S27, S29, S32). Others used loops inefficiently by introducing unnecessary single-iteration loops (S18 in Table A7 and Table A8), sometimes placing the entire pattern within them, or by selecting an incorrect number for the repetition counter (S26 in Table A8). These choices did not necessarily prevent students from successfully solving an activity and therefore should not necessarily be interpreted as evidence of difficulty in understanding the basic functionality of loops. Furthermore, in several cases, students did not attempt to optimize solutions that were functional but inefficient, instead accepting the successful outcome and proceeding to the next activity. Additionally, pattern recognition was important across all levels, particularly in activities involving longer or less obvious repetitive sequences. In several cases, students experienced difficulty in identifying the complete repetitive pattern and translating it into code. Some recognized and constructed only part of the pattern (S33 in Table A7, S26 in Table A8), while others initially used sequential commands before realizing that the sequence could be expressed more efficiently using a loop. Additional difficulties emerged when students had to coordinate multiple repeating patterns with intervening sequential commands, particularly in Level 22, LP3, and LP5 (Table A1 and Table A2). Orientation errors were also observed, particularly in levels containing consecutive turns. Students often confused left and right turns or were unable to identify the character’s current orientation, while constructing a solution.
LP4 is worth noting because students had to find the shortest path while simultaneously incorporating loops in their solutions. Nineteen (19) students produced relatively efficient solutions. Of these, three demonstrated a higher level of abstraction by identifying and incorporating an additional repeating pattern into their code, thereby reducing code redundancy. The remaining sixteen students employed a less abstract approach, resulting in solutions that contained more lines of code. The rest of the students used longer or less efficient solutions following the shortest path whereas some students selected a longer route or produced incorrect solutions. Thus, LP4 shows that students could use loops successfully to complete the task, but they did not always find the shortest and most efficient solution. Table 4 presents students’ solutions at the LP4 Level, ordered according to their efficiency.
Screen recordings also revealed differences in students’ debugging approaches. Some students relied heavily on trial and error, repeatedly running and modifying their programs rather than systematically examining the commands responsible for the main character’s incorrect movement. In some cases, repeated use of “fast execution” mode provided limited opportunity to observe the character’s movements and identify the error in the code, before the program was modified again.
The worksheet results offered further evidence of students’ understanding of simple loops beyond their performance within the game. In Task 1.1, students translated the given code into a path on a two-dimensional grid using directional arrows. In Task 1.2, they completed a simple loop with the appropriate movement or turn commands and repetition count to guide the van to its destination. Table 5 presents the results of students’ answers in these tasks.
Overall, students performed well, with 84.85% correct answers in both Tasks 1.1 and 1.2. Incorrect answers were mainly associated with difficulties also observed during playing the game, such as, recognizing the appropriate repeating pattern and maintaining the correct orientation when interpreting and constructing the route. Additional confusion, particularly in Task 1.1, seemed to arise from the operation of the left and right turn commands, which require the avatar to first move one step forward before changing direction. Overall, the worksheet results were consistent with the screen-recording evidence, indicating that most students understood the basic function of simple loops, although some continued to experience challenges when repetition had to be coordinated with pattern recognition and changes in direction (turn commands).
Students who reached optimal solutions across the simple-loop levels generally followed three problem-solving approaches: top-down, bottom-up and progressive. In the top-down approach, students first created the loop with the appropriate repetition count and then constructed the repeated pattern within it. In the bottom-up approach, they first constructed the repeating pattern and subsequently placed it inside a loop. In the progressive approach, students began with an inefficient, often sequential solution and gradually optimized it by identifying and incorporating repetition. Overall, the top-down approach predominated in 6 of the 7 simple-loop levels, while the bottom-up approach predominated in one level. The progressive approach did not predominate at any simple-loop level and was used only by a small number of students in some activities. No solution-strategy data were recorded for Level 23, as its multiple-loop structure did not allow students’ approaches to be clearly classified using the identified strategy categories. Similarly, LP4 was excluded because its solution process involved shortest-path selection in addition to loop construction.
Overall, the simple-loop activities suggest that most students understood the basic function of loops with a predefined number of repetitions. The main difficulties involved identifying the appropriate repeating pattern, selecting the correct repetition count, using loops inefficiently (e.g., unnecessary single-iteration or partial loop use), coordinating multiple loops and intervening commands, relying on sequential commands instead of loops, optimizing functional solutions, maintaining the correct orientation, and systematically debugging incorrect solutions.

4.2. Analysis of Game Results for Nested Loops

The third lesson examines nested loops through Levels 23–25 and the instructor-designed levels NLP1–NLP5. Table 6 summarizes the main characteristics of the efficient solutions for Levels 23–25 and the teacher-designed Levels NLP1-NLP5, including the number of loops, the number of repetitions in the outer and the inner loops, the number of blocks in the outer and in the inner loops and the total number of blocks. The design of each level and its corresponding reference efficient solution for nested loops levels are provided in Appendix A (Table A3 and Table A4).
Table 7 summarizes students’ performance across each level on the nested loops lesson. Thirty-four (34) students participated in this lesson of the didactic intervention. As shown in Table 7, efficient solutions were produced by 28 students in Level 23, 10 in Level 24, and 22 in Level 25. In the instructor-designed levels, the number of efficient solutions was relatively stable, ranging from 20 to 23 across NLP1-NLP5.
The screen recordings revealed a recurring trend of using simple loops instead of nested ones, despite the fact that many students were able to construct solutions with nested loops in several activities. This trend was observed across all nested-loop levels. With this approach, students were often able to identify individual repetitions and represent them by constructing functional solutions. However, they did not recognize that these smaller repeating structures were part of a larger pattern that could be enclosed within an outer loop. This distinction suggests that understanding simple repetition does not necessarily imply immediate recognition of hierarchical repetition.
Level 24 is a typical example. Table 8 presents students’ inefficient solutions at this level. The level required students to combine two repeating patterns separated by additional commands, making it more demanding than the previous one. In addition, the game rewarded the maximum score for correct functional solutions that represented the repeated patterns using simple loops rather than nested ones. Therefore, students could successfully complete the level without having to reconstruct their solution using nested loops, which may partly explain the frequent use of simple loops at this level. As shown in Table 8, twenty students provided a solution with three consecutive simple loops (first solution in Table 8).
More representative examples of inefficient solutions for the nested loop structure are provided in Appendix B (Table A9), while the following text refers to specific student solutions that illustrate particular difficulties or errors. In some cases, students identified both levels of repetition within the pattern but selected an incorrect repetition count for the outer loop and could not provide the efficient solution. Thus, the difficulty did not appear to reflect a lack of understanding of repetition itself, but rather challenges in coordinating two levels of repetition within a single program. Other difficulties observed across the nested-loop activities included failure to recognize repeating patterns (Table A9: S1, S29, S2, S5, S34), reliance on sequential-only solutions (S17 in Table A9), use of redundant or single-iteration loops (Table A9: S14, S20, S31), and orientation difficulties. Trial-and-error behavior was also observed in several activities, particularly Levels 23, NLP2, and NLP4, where some students frequently used the fast-execution mode while testing their solutions. At Level NLP5, the newly introduced “sound horn” command, used to clear cows blocking the car’s route, required some initial teacher explanation, but most students subsequently incorporated it into their solutions without difficulty.
Overall, many of the difficulties encountered with nested loops were also observed during the simple-loop lesson. However, nested loops introduced an additional structural challenge, requiring students to coordinate the inner and outer repetitions and determine the appropriate number of repetitions for the complete inner pattern.
The worksheet results provided additional evidence of these findings. In Task 2.1, students translated the given code into a path on a two-dimensional grid using directional arrows. In Tasks 2.2 and 2.3, they selected, from four and three options respectively, the code that would correctly guide the van to its destination. Table 9 presents the results of students’ answers in these tasks.
Incorrect responses in Tasks 2.1 and 2.2 were mainly associated with maintaining the correct order of commands, interpreting left and right turns and orientation. Although Task 2.3 had the lowest success rate, 18 of the 19 incorrect responses contained the correct repeated pattern but an incorrect outer repetition count (three instead of two). Thus, the low success rate on this task was primarily associated with determining how many times the complete structure should repeat rather than with failure to recognize the internal pattern.
Regarding solution strategies, students generally followed three approaches. In the bottom-up approach, they first constructed the inner repeating structure and then enclosed it within an outer loop. In the top-down approach, they first created the outer loop, and subsequently constructed the inner pattern. In the progressive approach, students initially produced a functional solution using simple loops and gradually reorganized it into a nested-loop solution. Overall, the bottom-up approach predominated in 6 of the 8 nested-loop levels, while the top-down and progressive approaches each predominated in one level. Among the six levels where the bottom-up approach predominated, the top-down approach ranked second in five, while the progressive approach ranked second in one.
Overall, the nested-loop results suggest that moving from simple loops to the nested loop lesson introduced the additional challenge of organizing repetition hierarchically. Several students were able to construct functional solutions using simple loops but they could not recognize that these smaller repeating structures were part of a larger pattern that could be enclosed within an outer loop.

4.3. Analysis of Game Results for Loops with Conditions (Repeat Until)

The fourth lesson introduced conditional repetition through the repeat-until structure. Students played with the game’s ready-made Levels 29–32 followed by the instructor-designed activities RU1-RU5. Table 10 summarizes the main characteristics of the efficient solutions for Levels 29–32 and the teacher-designed Levels RU1-RU5, including the number of loops, the number of blocks in each loop body and the total number of blocks. The design of each level and its corresponding reference efficient solution for repeat-until levels are provided in Appendix A (Table A5 and Table A6).
Table 11 summarizes students’ performance across each level of the repeat-until lesson. Thirty-four (34) students participated in this lesson of the didactic intervention.
Overall, performance was high, with efficient solutions ranging from 27 to 34 across all nine levels. Students’ performance was particularly high at Levels 29–32 while at Level RU1 all 34 students produced efficient solutions. Performance remained relatively high in the subsequent levels, although the number of efficient solutions gradually declined from 31 in RU2 to 30 in RU3, 28 in RU4, and 27 in RU5.
Representative examples of inefficient solutions for the repeat-until structure are provided in Appendix B (Table A10), while the following text refers to specific student solutions that illustrate particular difficulties or errors. In the ready-made Levels 29–32, where the repeating patterns were relatively short, students generally used the conditional repetition structure effectively, while RU1 presented no notable difficulties. The few inefficient solutions mainly involved the use of sequential commands (S17, S21 in Table A10) or placing an unnecessarily large sequence of commands inside the loop (S6 in Table A10). In addition, some students accepted functional but inefficient solutions without attempting to optimize their code.
Difficulties became more evident in RU2–RU5, where the repeated patterns contained approximately five to seven commands and required students to coordinate longer sequences of commands and changes in direction. Two related forms of pattern recognition difficulty were observed. In some cases, students were unable to recognize and represent the pattern. In others, although they recognized the pattern, they required several attempts to memorize and accurately construct the longer sequence of commands that comprised it. Thus, while some students had difficulty recognizing the repeating pattern, others recognized the pattern but had difficulty correctly ordering and constructing its commands as its length increased.
Additionally, in later levels (RU2-RU5), the trial and error method became more evident among the students. Some students repeatedly executed and modified their code rather than systematically examining the pattern to identify their errors. As in the previous lessons, the fast-execution mode was used during these attempts, possibly providing limited opportunities for careful observation and mentally tracking the character’s movement along the path. Screen recordings indicated this attitude but do not prove whether the difficulty in detecting errors was due to this game mode. Orientation difficulties appeared mainly at levels RU2 and RU3 where students had to combine longer repeated patterns with changes in direction. Also, some students continued to create solutions with sequential commands, while some accepted functionally correct but inefficient solutions without optimizing them.
Additionally, RU5 shows the difference between identifying repetition and choosing the appropriate loop structure. Some students used unnecessary nested loops within the repeat-until structure (S8, S3, S28), producing a functional but unnecessarily complex solution. In contrast, other students correctly represented two consecutive turn commands of the pattern using nested loops, demonstrating that the activity could be solved through different levels of abstraction. Table 12 presents students’ (S8, S3, S28) inefficient solutions at level RU5.
The worksheet results were consistent with the generally high game performance. In Task 3.1, students translated the given code into a path on a two-dimensional grid using directional arrows. In Task 3.2, they selected the two correct solutions from four code options that would guide the van to its destination. In Task 3.3, students completed a five-command repeating pattern within a repeat-until loop to guide the van along the given route. Table 13 presents the results of students’ answers in these tasks. The errors in the tasks involved incorrect interpretation of turn directions and difficulties in identifying or accurately representing the repeated pattern.
Regarding the solution strategies, the loop-first (top-down approach) strategy, in which students first placed the “repeat until” block and subsequently constructed the pattern inside it, predominated across all nine activities. The pattern-first (bottom–up approach) strategy, where the pattern is initially constructed and subsequently is enclosed within a “repeat until” block, although observed in most activities, was used by relatively few students.
Overall, the results indicate that students generally understood and successfully applied the “repeat until” repetition structure. The conditional loop lesson did not add a completely different set of difficulties from those previously observed. On the contrary, difficulties related to pattern recognition, orientation, inefficient loop use, trial and error, debugging, and optimization continued to emerge and became more pronounced in activities that contained larger and more complex repeating patterns.

4.4. Synthesis of Results

Analysis across the three lessons revealed several recurring difficulties, together with differences related to the structural demands of each loop type. For simple loops, the main difficulties involved recognizing repeated patterns, using loops inefficiently, relying on sequential commands, coordinating multiple loops with intermediate commands, maintaining the correct orientation, and optimizing functional but inefficient solutions. With nested loops these difficulties were maintained, and the difficulty of organizing repetitions into hierarchical levels was added. In particular, the frequent use of simple loops instead of nested structures showed that the recognition of individual repetitions (repeating patterns) did not necessarily result in the recognition of the repeating structure at a higher level. Τhe conditional structure itself (repeat until) was generally understood, while difficulties became more evident as the repeated patterns increased in length and incorporated additional changes in orientation. Table 14 summarizes the main difficulties encountered by students across the three loop lessons and identifies the game levels and worksheet tasks in which each difficulty was observed.
Orientation errors and debugging using trial-and-error were observed in all three lessons, indicating that these were not difficulties related exclusively to a specific loop structure. The results also suggest that successful level completion should be distinguished from efficient use of loop structures. Several students reached the destination using functional but less efficient solutions, using sequential or redundant commands or less efficient loop structures. Consequently, successful completion of a route does not necessarily imply that the student identified the most appropriate abstraction while inefficient solutions do not necessarily indicate a lack of understanding of loops. An inefficient solution may simply reflect a student’s decision to retain a functional solution rather than attempt to optimize it further.
Finally, the screen recordings revealed that students did not consistently follow a single approach when constructing their solutions. For simple loops, the top-down approach predominated across most levels, whereas the bottom-up approach predominated across most levels involving nested loops. For repeat-until loops, the loop-first approach predominated across all levels. Table 15 presents the problem-solving strategies adopted by students across the lessons and indicates the number of levels within each loop structure for which each strategy was predominant.

5. Discussion

This study investigated the challenges primary school students experienced while working with simple loops, nested loops and repeat-until loops in a block-based programming game, together with the problem-solving strategies they employed. The results indicated that most students had an adequate comprehension of loops. Most students were able to produce solutions using functional loops across each lesson, especially when the repeating patterns were short and relatively easy to identify. However, difficulties became more apparent when students had to recognize and construct longer patterns, coordinate multiple patterns, organize repetition hierarchically, coordinate repetition with changes in direction. Several difficulties including pattern recognition, reliance on sequential solutions, inefficient use of loops, orientation errors, and trial-and-error behavior, were observed across all loop types.
One of the most consistent findings related to RQ1, was the difficulty students experienced in recognizing repeating patterns. Students often struggled to recognize repeated patterns and represent those using loops or recognized only part of a pattern. This often resulted in sequential solutions or inefficient use of loops (e.g., with single-iteration loops, enclosing large sections of code in a single-iteration loop, or setting incorrect iteration counters). Previous studies using programming games have likewise identified difficulties in recognizing repeating patterns and correctly applying loops [45,46,47]. Moreover, previous research has reported difficulties when students are required to incorporate multiple instructions within a loop or combine multiple programming structures [49,52,54]. The present study complements these findings by examining the process students followed while constructing their solutions and how pattern recognition difficulties were reflected in sequential solutions, inefficient use of loops, incorrect number of iterations, and repeated attempts to modify their code.
The findings also suggest that successful task completion should be distinguished from the effective use of loops. Students sometimes reached the final destination of the task by implementing sequential solutions, or by using redundant code, or by producing less efficient solutions. Such solutions cannot be automatically interpreted as a failure to understand loops. Instead, they may indicate that a student may not have recognized the opportunity for a more abstract solution, or a decision to keep the initial inefficient solution without continuing to optimize it. This distinction is important in a game environment that may allow the player to advance to subsequent levels even without having reached an efficient solution.
The transition from simple to nested loops revealed a more specific difficulty related to the hierarchical organization of repetition. A recurring behavior across all nested-loop activities was the use of several simple loops instead of nested structures. Students could often identify distinct repeating structures and represent them using simple loops, but could not recognize that these individual repetitions were part of a larger pattern that could itself be repeated. This suggests that understanding simple repetition does not necessarily lead directly to recognizing hierarchical repetition. This interpretation is supported by the worksheet’s results: in the most difficult nested loops task (Task 2.3) most incorrect answers contained the correct internal pattern but an incorrect number of outer repetitions. Thus, combining the inner pattern with the repetition of the whole structure was often more difficult than recognizing the inner pattern alone. This finding is in line with earlier research [47,49,52,54] that highlighted challenges with nested loops and combining several programming structures.
The repetition structure “repeat until” was shown to be generally understood by students. Performance was high at the initial levels while difficulties became more evident at the later levels which contained larger repeating patterns and additional changes in direction. Some students failed to identify the repeating patterns while others recognized the pattern but had difficulty in correctly ordering its commands and constructing it as the pattern became larger. This finding aligns with previous research reporting difficulties with lengthy command sequences [49]. Rather than introducing fundamentally new challenges, the repeat-until activities reproduced difficulties already observed with simple and nested loops, including pattern recognition, orientation, inefficient loop use, and trial-and-error, particularly as the repeated sequences became longer.
Overall, the findings indicate that each loop type presented different demands. Simple loops required the recognition of repeating patterns, nested loops added the need to coordinate internal and external repetitions, while repeat-until activities added the requirement for recognition of increasingly longer command patterns.
Orientation was another common difficulty across all loop lessons. Students frequently made left/right errors or lost track of the avatar’s direction, especially in tasks involving repetition and multiple direction changes. Similar difficulties were also observed in the worksheets. In addition, such challenges with orientation and interpretation of graphical movement commands in programming environments have been reported in other studies [20,41,42,43].
Another common behavior across all three loop types was reliance on a trial and error debugging strategy, although its frequency varied across activities. Screen recordings showed that students often repeatedly executed and modified their program without systematically examining the source of the error in the avatar’s movement. Similar debugging challenges in loop-based tasks have been reported in earlier research [46].
Regarding RQ2, several games’ features appeared to be associated with some of the observed behaviors and students’ difficulties. However, since these features were not experimentally tested, the study cannot conclude that they directly caused these difficulties.
First, the operation of the left and right turn commands appears to be associated with orientation difficulties during gameplay and in worksheets’ tasks. In Rapid Router, these commands require the game character first to move one step forward and then turn in the appropriate direction. Students sometimes seemed to have difficulty interpreting these commands as they attempted to form the path, and similar errors were particularly evident in the simple loop worksheet. Since orientation errors persisted even after students had gained experience with the left and right turn command, the way the command operated may have contributed to some of the observed confusion. However, this should be considered a specific interface feature of Rapid Router, and not interpreted as a general difficulty inherent in understanding loops.
The “fast-execution” mode is another feature of the game that appears to be associated with students’ debugging processes. Students frequently used this mode during repeated unsuccessful trial-and-error attempts, particularly when working on more difficult tasks. Although fast execution may reduce opportunities for students to monitor the character’s movements and identify the source of an error, it remains unclear whether the use of this mode contributed to the difficulties they encountered. These findings suggest that execution controls may influence how students debug their programs, but further research is needed to examine this relationship.
The game’s scoring system may partly explain why students retained functional but inefficient solutions rather than trying to improve them. Although the game rewards efficient solutions in the ready-made levels, students can proceed without achieving the maximum score. Level 24 provides a representative example as students could obtain the maximum score using simple loops even though nested loops were the target concept. Therefore, in such cases successful completion did not necessarily require students to apply the programming concept targeted by the activity. However, the present study cannot determine whether the scoring system or other reasons led students to retain these solutions. It can only suggest that this mismatch may be a relevant feature of the game’s design.
These observations also illustrate the need to distinguish broader programming-learning difficulties from game-specific difficulties. Difficulties regarding pattern recognition, repetition counts, nested structures, and long command sequences have been reported in previous studies [45,46,47,49,52,54]. In contrast, Rapid Router’s turn commands operation, fast execution feature, and aspects of its scoring system, are game-specific features and should therefore not be generalized to other programming games.
In addition to examining difficulties, the study investigated how students constructed successful loop-based solutions. Three problem-solving strategies, namely the top-down, bottom-up, and progressive strategies, were identified for simple and nested loops, while for the repeat-until structure, the loop-first and pattern-first strategies were identified. The dominant strategy differed depending on the loop type. For simple loops, the top-down method predominated in 6 of the 7 levels included in the strategy analysis, while the bottom-up method predominated in six of the eight nested loop activities. For the repeat-until structure, the loop-first method dominated at all levels.
The predominance of the bottom-up strategy in nested loops is particularly notable. With this strategy, students first constructed the inner pattern and then incorporated it into an outer loop. This sequence of actions seems compatible with the hierarchical structure of nested loops because the smallest repeating unit is constructed first before being incorporated into the larger repetition. In contrast, the loop-first (top-down) logic, where students first constructed the repetition structure and then the inner pattern, predominated across most simple loops and across all conditional loops activities. These findings do not show that one strategy is better than another, but suggest that students may use different strategies depending on the structure of the programming problem. The progressive strategy is also informative. Some students initially formed a solution with sequential commands or simple sequential loops and then reorganized it into a more abstract solution. It therefore appears that an initially ineffective solution does not necessarily mean that students did not understand the corresponding loop concept.
Therefore, examining screen recordings offers information that cannot be obtained from the final solution alone. The present study provides evidence of how difficulties emerge and how students apply different strategies as they construct, modify, and improve their loop-based solutions. This constitutes an important contribution of the present exploratory mixed-methods study in relation to our previous work [40], which identified student difficulties reported in previous empirical studies but was unable to examine how students develop solutions during the game.
To examine the extent to which the difficulties identified in this study correspond to those recorded in previous studies, Table 16 compares the difficulties observed in the three types of loops with relevant findings in the literature. The comparison shows that several difficulties identified in the present study were also observed in other cases of learning programming through games, while the analysis carried out at the process level provides additional information on how these difficulties appeared while students were constructing a solution.

6. Implications

The findings of this study have implications for both researchers and educators and for the design of educational programming games. First, pattern recognition seems to be a crucial component in understanding loops. Students frequently struggled to recognize repeated patterns and represent them using loop structures. This suggests that researchers should look into how instructional design might support more effective pattern recognition abilities. Teachers could support this process by asking students to identify and describe repeated patterns before constructing their code and by using activities in which repeated commands are visually grouped or highlighted.
The recurring orientation errors and trial-and-error behavior during debugging a solution, also require more attention. Instead of examining program execution more systematically, students frequently relied on an approach of quick trial and error. Teachers could encourage students to predict the result of a loop before executing the code, trace the program step-by-step and explain why an error exists in a particular solution. Such activities may help students better understand how repetition affects movement, instead of repeatedly changing their code without carefully observing how it works.
Furthermore, the game allowed students to continue with functional but inefficient solutions and, in some activities, awarded maximum scores even when the solution did not meet the intended learning objective using less appropriate structures. Therefore, educational programming games could provide clearer feedback that distinguishes the completion of a task from the efficiency of the algorithm and explicitly encourage students to optimize solutions that are functional but inefficient. Similarly, these environments could provide better targeted support in cases where repeated unsuccessful attempts are detected.

7. Limitations

First, the study involved a small sample of 34 sixth-grade primary school students from a particular educational context. Therefore, the small sample size of the participants and their characteristics (such as age group, lack of prior experience with programming) do not allow us to generalize the results to primary school students more broadly.
Additionally, the duration of the study was relatively short, comprising four lessons each lasting 45 min (one didactical hour) delivered over four consecutive weeks. Although this short period allowed us to examine various difficulties and problem-solving strategies associated with the three loop types, it did not allow us to explore how students’ understanding develops over longer periods of time or whether the observed difficulties decrease as students gain additional programming experience. Longer-term studies are needed to investigate the development and persistence of these difficulties.
Given that the first author served as both teacher-researcher and primary coder, some researcher subjectivity may have influenced the interpretation of student behavior. Although the second author independently coded a random sample of the data, the possibility of researcher bias cannot be completely ruled out.
Additionally, the data collection tools included students’ screen recordings, students’ final solutions to the game levels, worksheets results, dashboard data, and research diary. Although students’ screen recordings enabled analysis of their interactions with the game environment, their performance, and their different approaches to problem-solving, these recordings alone could not reveal the underlying reasons for students’ particular mistakes and challenges. Deeper knowledge of students’ reasoning and conceptual comprehension could be obtained by additional qualitative techniques such as think-aloud procedures, interviews, reflective conversations, and voice and reaction recording.
Finally, some observed difficulties may be related to specific features of the programming environment of Rapid Router, including the interface of the game’s virtual world, the operation of turn commands (which requires the avatar first make a step forward before changing direction), speed execution options, and the scoring and progression mechanisms. The study did not test these game features separately or compare Rapid Router with another programming environment. Therefore, we cannot conclude that these features directly influenced students’ behavior, and we cannot generalize the findings regarding this game to other programming games.

8. Conclusions and Directions for Future Research

8.1. Conclusions

This study examined the difficulties and problem-solving strategies of sixth-grade primary school students when learning loops through a block-based programming game. The study focused on three different loop types: simple loops, nested loops, and conditional loops (repeat-until structure). The findings revealed important details about the difficulties and problem-solving strategies students exhibited when learning loops in such a setting, as well as aspects of the game design that appeared to be associated with some of these difficulties. By combining students’ final solutions with screen recordings, dashboard progress data, classroom observations, and worksheet responses, the study provides insight into how students constructed, tested, and modified their solutions, rather than focusing only on whether they successfully completed the tasks.
Regarding RQ1, the findings revealed several recurring challenges across the three loop types including recognizing repeated patterns, using loops to represent them efficiently, relying on sequential solutions, coordinating multiple loops and commands, maintaining orientation, debugging solutions through repeated trial and error, limited optimization for inefficient but functionally correct solutions. Students appeared to encounter greater challenges as the structure of the activities became more complex. With simple loops, students experienced difficulties when combining several repeating patterns with sequential commands between them while nested loops added the demand for recognizing hierarchical repetition and for coordinating the inner with the outer repetition. Furthermore, difficulties in later repeat-until activities were particularly evident when repeated patterns became longer and involved additional changes in direction.
The study also identified different solution strategies. Top-down, bottom-up, and progressive approaches were observed for simple and nested loops, while loop-first and pattern-first approaches were identified for repeat-until loops. The predominance of different solution strategies according to the type of loop used suggests that students may organize the solution strategy they follow depending on the specific loop structure required by the activity. The progressive approach, in which some students converted an initially sequential or inefficient solution into a more efficient loop-based solution, is particularly noteworthy. This highlights the value of examining the whole problem-solving process rather than only students’ final solutions.
Regarding RQ2, several characteristics of the game appeared to be associated with observed difficulties or students’ behaviors. These included the operation of the turn commands, the frequent use of “fast execution” when debugging solutions and aspects of the game’s scoring and progression system that allowed students to continue retaining functional but inefficient solutions. However, these features were not experimentally tested or compared with other alternative environments. Therefore, we cannot conclude that they caused the observed behaviors, and further research is needed to examine their effects.

8.2. Future Work

The findings of this exploratory mixed-methods study could serve as the foundation for other research that expands the findings in different ways. First, research that includes a larger and more diverse sample of participants, a different age range of students, and students with different programming knowledge backgrounds, could investigate whether the difficulties recorded in this study as well as the solution strategies are also observed in other educational contexts. Additionally, educators and researchers in this field could implement longer term studies, with additional lessons and activities, which could allow further investigation of how students’ understanding develops over time and whether difficulties persist or are reduced as students gain more experience in programming.
Furthermore, future studies could combine screen recording with think-aloud protocols or students’ interviews. Such methods could provide more evidence of how students choose particular problem-solving strategies, and shed light on the reasons behind some particular mistakes during the solution process.
Finally, additional research could investigate how programming knowledge developed through educational programming games can be applied in different contexts. Examining students’ ability to apply the knowledge of loops gained using a game in other programming environments like Scratch, could provide evidence of how well this knowledge transfers beyond the game context.

Author Contributions

Conceptualization, A.G. and S.X.; methodology, A.G. and S.X.; validation, A.G. and S.X.; formal analysis, A.G. and S.X.; investigation, A.G. and S.X.; resources, A.G. and S.X.; data curation, A.G. and S.X.; writing—original draft preparation, A.G.; writing—review and editing, A.G. and S.X.; visualization, A.G. and S.X.; supervision, S.X.; project administration, S.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This study was conducted in accordance with national and institutional research ethics guidelines. The research involved the collection of data completely anonymized at the time of collection. No personally identifiable information, either simple or special category (sensitive) personal data, as defined under the General Data Protection Regulation (EU) 2016/679 (GDPR), were collected, recorded, or stored. Given the anonymous nature of the data collection and the absence of identifiable human subject data, the study qualified as minimal-risk research and was not submitted to the Committee for Research Ethics of the University of Macedonia for formal approval under applicable institutional procedures. The didactical intervention took place according to the program of studies and the school timetable. Additionally, participation was entirely voluntary and participants were informed about the purpose of the study prior to participation and gave their verbal informed consent for the research purpose.

Informed Consent Statement

Verbal informed consent was obtained from all participants involved in the study.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

We would like to express our gratitude to all participating students and schools in this study for allowing us to carry out this research and for their collaboration.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Table A1. Level designs and reference efficient solutions for levels 19–22 (Simple loops).
Table A1. Level designs and reference efficient solutions for levels 19–22 (Simple loops).
Level 19Level 20Level 21Level 22
Level
Design
Computers 15 00645 i011Computers 15 00645 i012Computers 15 00645 i013Computers 15 00645 i014
Level SolutionComputers 15 00645 i015Computers 15 00645 i016Computers 15 00645 i017Computers 15 00645 i018
Table A2. Level designs and reference efficient solutions for levels LP1-LP5 (Simple loops).
Table A2. Level designs and reference efficient solutions for levels LP1-LP5 (Simple loops).
LevelLevel DesignLevel Solution
LP1Computers 15 00645 i019Computers 15 00645 i020
LP2Computers 15 00645 i021Computers 15 00645 i022
LP3Computers 15 00645 i023Computers 15 00645 i024
LP4Computers 15 00645 i025Computers 15 00645 i026
Computers 15 00645 i027
LP5Computers 15 00645 i028Computers 15 00645 i029
Table A3. Level designs and reference efficient solutions for levels 23–25 (Nested loops).
Table A3. Level designs and reference efficient solutions for levels 23–25 (Nested loops).
Level 23Level 24Level 25
Level
Design
Computers 15 00645 i030Computers 15 00645 i031Computers 15 00645 i032
Level SolutionComputers 15 00645 i033Computers 15 00645 i034Computers 15 00645 i035
Table A4. Level designs and reference efficient solutions for levels NLP1-NLP5 (Nested loops).
Table A4. Level designs and reference efficient solutions for levels NLP1-NLP5 (Nested loops).
LevelLevel DesignLevel Solution
NLP1Computers 15 00645 i036Computers 15 00645 i037
NLP2Computers 15 00645 i038Computers 15 00645 i039
NLP3Computers 15 00645 i040Computers 15 00645 i041
NLP4Computers 15 00645 i042Computers 15 00645 i043
NLP5Computers 15 00645 i044Computers 15 00645 i045
Table A5. Level designs and reference efficient solutions for levels 29–32 (Repeat-until loops).
Table A5. Level designs and reference efficient solutions for levels 29–32 (Repeat-until loops).
Level 29Level 30Level 31Level 32
Level
Design
Computers 15 00645 i046Computers 15 00645 i047Computers 15 00645 i048Computers 15 00645 i049
Level SolutionComputers 15 00645 i050Computers 15 00645 i051Computers 15 00645 i052Computers 15 00645 i053
Table A6. Level designs and reference efficient solutions for levels RU1-RU5 (Repeat-until loops).
Table A6. Level designs and reference efficient solutions for levels RU1-RU5 (Repeat-until loops).
LevelLevel DesignLevel Solution
RU1Computers 15 00645 i054Computers 15 00645 i055
RU2Computers 15 00645 i056Computers 15 00645 i057
RU3Computers 15 00645 i058Computers 15 00645 i059
RU4Computers 15 00645 i060Computers 15 00645 i061
RU5Computers 15 00645 i062Computers 15 00645 i063

Appendix B

Table A7. Inefficient solutions at level 21.
Table A7. Inefficient solutions at level 21.
Student IDS18S2, S20, S21, S30, S31, S34S33
Student solutionComputers 15 00645 i064Computers 15 00645 i065Computers 15 00645 i066
Score 12/2013/2016/20
Total Blocks13129
Additional Blocks used874
Table A8. Inefficient solutions at level LP2.
Table A8. Inefficient solutions at level LP2.
Student IDS26S14, S17, S27, S29, S32S18
Student solutionComputers 15 00645 i067Computers 15 00645 i068Computers 15 00645 i069
Total blocks7910
Additional Blocks356
Table A9. Inefficient solutions at level 25.
Table A9. Inefficient solutions at level 25.
Student IDS1, S29S2, S5, S34S17S14, S20S31
Student solutionComputers 15 00645 i070Computers 15 00645 i071Computers 15 00645 i072Computers 15 00645 i073Computers 15 00645 i074
Score19/2017/2015/2014/2013/20
Total Blocks79111213
Additional Blocks used13567
Table A10. Inefficient solutions at level 31.
Table A10. Inefficient solutions at level 31.
Student IDS17, S21S6
Student solutionComputers 15 00645 i075Computers 15 00645 i076
Score18/2016/20
Total blocks810
Additional Blocks24

References

  1. Papert, S. Computers for children. In Mindstorms: Children, Computers and Powerful Ideas; Basic Books, Inc.: New York, NY, USA, 1980. [Google Scholar]
  2. Papert, S. An exploration in the space of mathematics educations. Int. J. Comput. Math. Learn. 1996, 1, 95–123. [Google Scholar] [CrossRef] [Scilit]
  3. Paraskevopoulou-Kollia, E.-A.; Michalakopoulos, C.-A.; Zygouris, N.C.; Bagos, P.G. Computational Thinking in Primary and Pre-School Children: A Systematic Review of the Literature. Educ. Sci. 2025, 15, 985. [Google Scholar] [CrossRef] [Scilit]
  4. Wing, J.M. Computational thinking. Commun. ACM 2006, 49, 33–35. [Google Scholar] [CrossRef] [Scilit]
  5. Shute, V.J.; Sun, C.; Asbell-Clarke, J. Demystifying computational thinking. Educ. Res. Rev. 2017, 22, 142–158. [Google Scholar] [CrossRef] [Scilit]
  6. Grover, S.; Pea, R. Computational thinking in K–12: A review of the state of the field. Educ. Res. 2013, 42, 38–43. [Google Scholar]
  7. Cutumisu, M.; Adams, C.; Lu, C. A Scoping Review of Empirical Research on Recent Computational Thinking Assessments. J. Sci. Educ. Technol. 2019, 28, 651–676. [Google Scholar] [CrossRef] [Scilit]
  8. Nouri, J.; Zhang, L.; Mannila, L.; Norén, E. Development of computational thinking, digital competence and 21st century skills when learning programming in K-9. Educ. Inq. 2020, 11, 1–17. [Google Scholar] [CrossRef] [Scilit]
  9. Tikva, C.; Tambouris, E. Mapping Computational Thinking through Programming in K-12 Education: A Conceptual Model Based on a Systematic Literature Review. Comput. Educ. 2021, 162, 104083. [Google Scholar] [CrossRef] [Scilit]
  10. Heintz, F.; Mannila, L.; Farnqvist, T. A review of models for introducing computational thinking, computer science and computing in K-12 education. In Proceedings of the 2016 IEEE Frontiers in Education Conference (FIE), Erie, PA, USA, 12–15 October 2016. [Google Scholar] [CrossRef] [Scilit]
  11. Bocconi, S.; Chioccariello, A.; Earp, J. The Nordic Approach to Introducing Computational Thinking and Programming in Compulsory Education; Nordic@BETT2018 Steering Group: London, UK, 2018. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  12. Brennan, K.; Resnick, M. New frameworks for studying and assessing the development of computational thinking. In Proceedings of the 2012 Annual Meeting of the American Educational Research Association 2012, Vancouver, BC, Canada, 13–17 April 2012. [Google Scholar]
  13. Perez Valdes, G.P.; Boude Figueredo, O.; Vargas Sanchez, A.D. Integrating computational thinking in children aged 3 to 6: Challenges and opportunities in early childhood education. Front. Educ. 2025, 10, 1535135. [Google Scholar] [CrossRef] [Scilit]
  14. Grover, S.; Pea, R. Computational thinking: A competency whose time has come. In Computer Science Education: Perspectives on Teaching and Learning in School; Sentance, S., Barendsen, E., Schulte, C., Eds.; Bloomsbury Academic: London, UK, 2018; pp. 19–38. [Google Scholar] [CrossRef] [Scilit]
  15. Zhao, W.; Shute, V.J. Can playing a video game foster computational thinking skills? Comput. Educ. 2019, 141, 103633. [Google Scholar] [CrossRef] [Scilit]
  16. Bocconi, S.; Chioccariello, A.; Kampylis, P.; Dagienė, V.; Wastiau, P.; Engelhardt, K.; Earp, J.; Horvath, M.A.; Jasutė, E.; Malagoli, C.; et al. Reviewing Computational Thinking in Compulsory Education: State of Play and Practices from Computing Education; Publications Office of the European Union: Luxembourg, 2022. [Google Scholar]
  17. Lye, S.Y.; Koh, J.H.L. Review on teaching and learning of computational thinking through programming: What is next for K-12? Comput. Hum. Behav. 2014, 41, 51–61. [Google Scholar] [CrossRef] [Scilit]
  18. Montuori, C.; Gambarota, F.; Altoé, G.; Arfé, B. The cognitive effects of computational thinking: A systematic review and meta-analytic study. Comput. Educ. 2024, 210, 104961. [Google Scholar] [CrossRef] [Scilit]
  19. Zaharija, G.; Mladenović, S.; Boljat, I. Introducing basic Programming Concepts to Elementary School Children. Procedia—Soc. Behav. Sci. 2013, 106, 1576–1584. [Google Scholar] [CrossRef] [Scilit]
  20. Kalelioğlu, F. A new way of teaching programming skills to K-12 students: Code.org. Comput. Hum. Behav. 2015, 52, 200–210. [Google Scholar] [CrossRef] [Scilit]
  21. Loksa, D.; Ko, A.J.; Jernigan, W.; Oleson, A.; Mendez, C.; Burnett, M. Programming, problem solving, and self-awareness: Effects of explicit guidance. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems, San Jose, CA, USA, 7–12 May 2016; pp. 1449–1461. [Google Scholar] [CrossRef] [Scilit]
  22. Shahid, M.; Wajid, A.; Haq, K.U.; Saleem, I.; Shujja, A.H. A Review of Gamification for Learning Programming Fundamental. In Proceedings of the 3rd International Conference on Innovative Computing, Lahore, Pakistan, 1 November 2019; pp. 1–8. [Google Scholar] [CrossRef] [Scilit]
  23. Mladenović, M.; Boljat, I.; Žanko, Ž. Comparing loops misconceptions in block-based and text-based programming languages at the K-12 level. Educ. Inf. Technol. 2018, 23, 1483–1500. [Google Scholar] [CrossRef] [Scilit]
  24. Bennedsen, J.; Caspersen, M.E. Abstraction ability as an indicator of success for learning object-oriented programming? ACM SIGCSE Bull. 2006, 38, 39–43. [Google Scholar] [CrossRef] [Scilit]
  25. Zehetmeier, D.; Böttcher, A.; Brüggemann-Klein, A.; Thurner, V. Defining the Competence of Abstract Thinking and Evaluating CS-Students’ Level of Abstraction. In Proceedings of the Hawaii International Conference on System Sciences, Hawaii, CA, USA, 8 January 2019. [Google Scholar] [CrossRef] [Scilit]
  26. Piaget, J. Part I: Cognitive development in children: Piaget development and learning. J. Res. Sci. Teach. 1964, 2, 176–186. [Google Scholar] [CrossRef] [Scilit]
  27. Pakpahan, F.H.; Saragih, M. Theory Of Cognitive Development By Jean Piaget. J. Appl. Linguist. 2022, 2, 55–60. [Google Scholar] [CrossRef] [Scilit]
  28. Piaget, J. The Origins of Intelligence in Children; Cook, M., Translator; W. W. Norton & Company: New York, NY, USA, 1952. [Google Scholar] [CrossRef] [Scilit]
  29. Relkin, E.; de Ruiter, L.E.; Bers, M.U. Learning to code and the acquisition of computational thinking by young children. Comput. Educ. 2021, 169, 104222. [Google Scholar] [CrossRef] [Scilit]
  30. Dúo-Terrón, P. Analysis of Scratch Software in Scientific Production for 20 Years: Programming in Education to Develop Computational Thinking and STEAM Disciplines. Educ. Sci. 2023, 13, 404. [Google Scholar] [CrossRef] [Scilit]
  31. Batni, B.; Junaini, S.N.; Sidi, J.; Mustafa, W.A.; Ismail, Z.I.A. Current Research Trends of Scratch Block-Based Programming for K-12: A Systematic Review. J. Adv. Res. Appl. Sci. Eng. Technol. 2025, 51, 138–152. [Google Scholar] [CrossRef] [Scilit]
  32. Resnick, M.; Maloney, J.; Monroy-Hernández, A.; Rusk, N.; Eastmond, E.; Brennan, K.; Millner, A.; Rosenbaum, E.; Silverman, B.; Silver, J.; et al. Scratch: Programming for all. Commun. ACM 2009, 52, 60–67. [Google Scholar] [CrossRef] [Scilit]
  33. Kazimoglu, C.; Kiernan, M.; Bacon, L.; Mackinnon, L. Learning programming at the computational thinking level via digital game-play. Procedia Comput. Sci. 2012, 9, 522–531. [Google Scholar] [CrossRef] [Scilit]
  34. Malliarakis, C.; Satratzemi, M.; Xinogalos, S. CMX: The effects of an educational MMORPG on learning and teaching computer programming. IEEE Trans. Learn. Technol. 2017, 10, 219–235. [Google Scholar] [CrossRef] [Scilit]
  35. Videnovik, M.; Vold, T.; Kiønig, L.; Bogdanova, A.M.; Trajkovik, V. Game-based learning in computer science education: A scoping literature review. Int. J. STEM Educ. 2023, 10, 54. [Google Scholar] [CrossRef] [Scilit]
  36. Gundersen, S.W.; Lampropoulos, G. Using Serious Games and Digital Games to Improve Students’ Computational Thinking and Programming Skills in K-12 Education: A Systematic Literature Review. Technologies 2025, 13, 113. [Google Scholar] [CrossRef] [Scilit]
  37. Theodoropoulos, A.; Lepouras, G. Digital game-based learning and computational thinking in P-12 education: A systematic literature review on playing games for learning programming. In Handbook of Research on Tools for Teaching Computational Thinking in P- 12 Education 2020; IGI Global: Hershey, PA, USA, 2020; pp. 159–183. [Google Scholar] [CrossRef] [Scilit]
  38. Papadakis, S. The impact of coding apps to support young children in computational thinking and computational fluency. A literature review. Front. Educ. 2021, 6, 657895. [Google Scholar] [CrossRef] [Scilit]
  39. Giannakoulas, A.; Xinogalos, S. Studying the effects of educational games on cultivating computational thinking skills to primary school students: A systematic literature review. J. Educ. Comput. Res. 2024, 11, 1283–1325. [Google Scholar] [CrossRef] [Scilit]
  40. Giannakoulas, A.; Xinogalos, S. A Critical Review of Primary School Students’ Difficulties in Learning Programming Through Educational Games. J. Educ. Comput. Res. 2025, 63, 627–661. [Google Scholar] [CrossRef] [Scilit]
  41. Fessakis, G.; Gouli, E.; Mavroudi, E. Problem solving by 5-6 years old kindergarten children in a computer programming environment: A case study. Comput. Educ. 2013, 63, 87–97. [Google Scholar] [CrossRef] [Scilit]
  42. Lambić, D.; Đorić, B.; Ivakić, S. Investigating the effect of the use of code.org on younger elementary school students’ attitudes towards programming. Behav. Inf. Technol. 2020, 40, 1784–1795. [Google Scholar] [CrossRef] [Scilit]
  43. Forquesato, L.E.T. Using a Game to Teach Computational Thinking and Assess Learning. Master’s Thesis, State University of Campinas, Institute of Computing, Campinas, SP, Brazil, 2018; 56p. [Google Scholar] [CrossRef] [Scilit]
  44. Karadeniz, S.; Samur, Y.; Özden, M.Y. Playing with Algorithms to Learn Programming: A Case Study on 5 Years Old Children. In Proceedings of the 9th International Conference on Information Technology and Applications ICITA 2014, Sydney, Australia, 1–4 July 2014. [Google Scholar]
  45. Williams, C.; Alafghani, E.; Daley, A.; Gregory, K.; Rydzewski, M. Teaching programming concepts to elementary students. In Proceedings of the 2015 IEEE Frontiers in Education Conference (FIE), El Paso, TX, USA, 21–24 October 2015; pp. 1–9. [Google Scholar] [CrossRef] [Scilit]
  46. Liu, Z.; Zhi, R.; Hicks, A.; Barnes, T. Understanding problem solving behavior of 6–8 graders in a debugging game. Comput. Sci. Educ. 2017, 27, 1–29. [Google Scholar] [CrossRef] [Scilit]
  47. Giannakoulas, A.; Xinogalos, S. A pilot study on the effectiveness and acceptance of an educational game for teaching programming concepts to primary school students. Educ. Inf. Technol. 2018, 23, 2029–2052. [Google Scholar] [CrossRef] [Scilit]
  48. Sorrentino, F.; Spano, L.D.; Casti, S.; Carcangiu, A.; Corda, F.; Cherchi, G.; Murru, A.; Muntoni, A.; Nuvoli, S.; Scateni, R. ChIP: Teaching coding in primary schools. CEUR Workshop Proc. 2017, 1910, 106–110. [Google Scholar]
  49. Gomes, T.C.S.; Pontual Falcão, T.; Tedesco, P.C.A.R. Exploring an approach based on digital games for teaching programming concepts to young children. Int. J. Child-Comput. Interact. 2018, 16, 77–84. [Google Scholar] [CrossRef] [Scilit]
  50. Steinmaurer, A.; Pirker, J.; Gütl, C. sCool—Game Based Learning in STEM Education: A Case Study in Secondary Education. In Proceedings of the ICL 2018—The Challenges of the Digital Transformation in Education, Kos Island, Greece, 25–28 September 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 614–625. [Google Scholar]
  51. Steinmaurer, A.; Pirker, J.; Gütl, C. Scool—Game-based learning in computer science class A case study in secondary education. Int. J. Eng. Pedagog. 2019, 9, 35–50. [Google Scholar] [CrossRef] [Scilit]
  52. Segura, R.J.; del Pino, F.J.; Ogáyar, C.J.; Rueda, A.J. VR-OCKS: A virtual reality game for learning the basic concepts of programming. Comput. Appl. Eng. Educ. 2020, 28, 31–41. [Google Scholar] [CrossRef] [Scilit]
  53. Toukiloglou, P.; Xinogalos, S. Evaluating support systems and interface efficiency in Hour of Code’s Minecraft Adventurer. Educ. Inf. Technol. 2024, 29, 11869–11889. [Google Scholar] [CrossRef] [Scilit]
  54. Guenaga, M.; Eguíluz, A.; Garaizar, P.; Gibaja, J. How do students develop computational thinking? Assessing early programmers in a maze-based online game. Comput. Sci. Educ. 2021, 31, 259–289. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Research process.
Figure 1. Research process.
Computers 15 00645 g001
Table 1. Lessons and content of Rapid router according to the teaching proposal.
Table 1. Lessons and content of Rapid router according to the teaching proposal.
LessonContentGame LevelsTeacher Levels
Introduction LevelsCustom Levels
1. Getting StartedSequence commands execution1–12--
2. Loops and Repetitions
(Repeat × Times)
Loops with a predefined number of repetitions19–22LP Intro_1
LP Intro_2
LP1, LP2, LP3, LP4, LP5
3. Loops and Repetitions
(Nested Loops)
Nested loops23–25NLP Intro_1NLP 1, NLP 2, NLP 3, NLP 4, NLP 5
4. Loops with Conditions (Repeat until)Loops with undefined number of repetitions 29–32RU Intro 1
RU Intro 2
RU 1, RU 2, RU 3,
RU 4, RU 5
LP: Loops, NLP: Nested Loops, RU: Repeat until
Table 2. Characteristics of efficient solutions for Simple loop levels.
Table 2. Characteristics of efficient solutions for Simple loop levels.
Level19202122LP1LP2LP3LP4LP5
Number of loops111611322
Number of repetitions in each loop3332/2/3/4/7/3333/2/32/43/3
Number of blocks within each loop1241332/1/24/13/3
Total number of blocks23519448811
Table 3. Students’ performance across each level at Simple loops lesson.
Table 3. Students’ performance across each level at Simple loops lesson.
Levels19202122LP1LP2LP3LP4LP5
Efficient solutions333125232525281911
Inefficient solutions028867268
Wrong solution000110121
No solutions0001112613
Table 4. Students’ solutions at level LP4 according to their efficiency.
Table 4. Students’ solutions at level LP4 according to their efficiency.
EfficiencyDescriptionStudent IDIllustrative Solutions
Efficient
(more abstract solution)
Shortest route; appropriate loop use; repeating pattern identifiedS15, S22, S23Computers 15 00645 i001
Efficient
(less abstract solution)
Shortest route; appropriate loop use; minor code redundancyS1, S2, S4, S8, S9, S11, S12, S13, S16, S18, S21, S29, S30, S31, S33, S34Computers 15 00645 i002
InefficientShortest route; sequential commands instead of loopsS14, S24, S26, S27, S32Computers 15 00645 i003
InefficientLongest route; sequential commands instead of loopsS19Computers 15 00645 i004
WrongIncorrect solution; follows the longest routeS20Computers 15 00645 i005
WrongIncorrect solution; missing required commandsS28Computers 15 00645 i006
Table 5. Cumulative results of student responses in Simple loops evaluation worksheet.
Table 5. Cumulative results of student responses in Simple loops evaluation worksheet.
TasksTask 1.1Task 1.2
Correct answers84.85% (28)84.85% (28)
Wrong answers15.15% (5)15.15% (5)
Total100% (33)100% (33)
Table 6. Characteristics of efficient solutions for Nested loop levels.
Table 6. Characteristics of efficient solutions for Nested loop levels.
Level232425NLP1NLP2NLP3NLP4NLP5
Number of loops37223232
Number of repetitions in outer loop23/3233333
Number of repetitions in inner loops 5/52/2/2/2243/343/26
Number of blocks in the outer loop body84/4438554
Number of blocks in the inner loop body1/11/1/1/1211/111/11
Total number of blocks912649665
Table 7. Students’ performance across each level at Nested loops lesson.
Table 7. Students’ performance across each level at Nested loops lesson.
Levels232425NLP1NLP2NLP3NLP4NLP5
Efficient solutions2810222323232023
Inefficient solutions621101067115
Wrong solution03003001
No Solutions00212435
Table 8. Inefficient solutions at level 24.
Table 8. Inefficient solutions at level 24.
Student IDS1–S5, S7–S10, S12–S14, S16–S17,S19, S22–S23, S28, S29, S32S21
Student solutionComputers 15 00645 i007Computers 15 00645 i008
Score2010
Total blocks1226
Additional blocks013
Table 9. Cumulative results in the Nested loops evaluation worksheet.
Table 9. Cumulative results in the Nested loops evaluation worksheet.
TaskCorrect AnswersWrong AnswersTotal
Task 2.173.53% (25)26.47% (9)100% (34)
Task 2.276.47% (26)23.53% (8)100% (34)
Task 2.344.12% (15)55.88% (19)100% (34)
Table 10. Characteristics of efficient solutions for Repeat-until levels.
Table 10. Characteristics of efficient solutions for Repeat-until levels.
Level29303132RU1RU2RU3RU4RU5
Number of loops332353333
Number of blocks in the loop body124325677
Total number of blocks346547899
Table 11. Students’ performance across each level at Repeat-until lesson.
Table 11. Students’ performance across each level at Repeat-until lesson.
Levels29303132RU1RU2RU3RU4RU5
Efficient solutions303131323431302827
Inefficient solutions333102223
Wrong solution000001220
No Solutions100100024
Table 12. Inefficient solutions at level RU5.
Table 12. Inefficient solutions at level RU5.
Student IDS8S3, S28
Student solutionComputers 15 00645 i009Computers 15 00645 i010
Total blocks1010
Additional blocks11
Table 13. Cumulative results in the Repeat-until evaluation worksheet.
Table 13. Cumulative results in the Repeat-until evaluation worksheet.
TasksCorrect AnswersWrong AnswersTotal
Task 3.176.47% (26)23.53% (8)100% (34)
Task 3.270.59% (24)29.41% (10)100% (34)
Task 3.379.41% (27)20.59% (7)100% (34)
Table 14. Common students’ difficulties across loop types.
Table 14. Common students’ difficulties across loop types.
Main Observed Difficulties/BehavioursLoop TypeLevels/Worksheet Tasks
Difficulty Observed
Levels (Frequency)
Failure to recognize repeating patternsSimple loops20, 21, 22, LP1, LP2, LP3, LP4, LP5, Task 1.18/9
Nested loops23, 24, 25, NLP1, NLP2, NLP3, NLP4, NLP58/8
Repeat until29, 30, 31, RU2, RU3, RU4, RU5, Task 3.37/9
Avoiding loops entirely Sequential solutionSimple loops20, 21, 22, LP1, LP2, LP3, LP4, LP58/9
Nested loops25, NLP1, NLP2, NLP3, NLP4, NLP56/8
Repeat until29, 30, 31, 32, RU2, RU3, RU47/9
Inefficient loop use (single iteration loops, wrapping entire program in loop)Simple loops20, 21, 22, LP1, LP2, LP3, LP4, LP58/9
Nested loops25, NLP3, NLP43/8
Repeat until29, 30, 31, RU54/9
Incorrect loop countsSimple loops20,21,22, LP1, LP2, LP3, LP4 LP58/9
Nested loops23, 24, 25, NLP2, NLP4
Task 2.3
5/8
Repeat until-0/9
Dependence on trial-and-error approachSimple loops20, 21, 22, LP1, LP2, LP3, LP4, LP58/9
Nested loops23, NLP2, NLP43/8
Repeat until31, RU2, RU3. RU4, RU55/9
Frequent use of “fast execution” mode Simple loops21, LP32/9
Nested loops23, NLP2, NLP43/8
Repeat until31,32, RU2, RU3, RU4, RU56/9
Coordination of multiple loops and commandsSimple loops22, LP3, LP53/9
Nested loops241/8
Repeat until-0/9
Simple loops only (no nested loops)Simple loops-0/9
Nested loops23, 24, 25, NLP1, NLP2, NLP3, NLP4, NLP58/8
Repeat until-0/9
Limited optimizationSimple loops20, 21, 22, LP1, LP2, LP3, LP4, LP58/9
Nested loops-0/8
Repeat until29, 30, 31, RU2, RU3, RU46/9
Orientation errorsSimple loops21, 22, LP3, LP4, LP5, Task1.1,
Task1.2
5/9
Nested loops23, 24, Task2.1, Task2.22/8
Repeat untilRU2, RU3, Task 3.1, Task 3.22/9
Confusion from the operation of left/right turn commands Simple loopsTask1.1-
Nested loops
Repeat until
Table 15. Students’ problem-solving strategies across loop types.
Table 15. Students’ problem-solving strategies across loop types.
Loop TypeMain Solution StrategiesNumber of Levels PredominantOperation
Simple LoopsTop-down6/7Loop first, then repeated pattern
Bottom-up1/7Pattern first, then enclosed in loop
Progressive0/7
(observed, but never predominant)
Functional/inefficient solution first, gradually optimized
Nested LoopsTop-down1/8Outer loop first, then inner pattern
Bottom-up6/8Inner repeated pattern first, then enclosed it in outer loop
Progressive1/8Solution with simple loops, gradually reorganized into nested
Repeat untilLoop-first (Top-down)9/9Repeat until placed first, then construct pattern
Pattern-first (Bottom-up)0/9
(observed, but never predominant)
Construct pattern first, then enclose in repeat until
Table 16. Mapping students’ difficulties observed with loops to existing literature.
Table 16. Mapping students’ difficulties observed with loops to existing literature.
Observed DifficultyConcept DifficultiesGame Element Difficulties
Failure to recognize repeating patternsRecognize an existing pattern, which has to be coded and repeated using loops or nested loops [47]
Avoiding loops entirely Sequential solutionComprehending loops when they have to incorporate two or more instructions into a simple repetition block [45,49]; Challenges combining multiple programming structures such as sequences and loops [52,54]; Inability to implement lengthy instruction sequences [49] Possibly related to difficulty in understanding the loop representation [49]
Inefficient loop use (single iteration loops, wrapping full program)Comprehend how a multi-step program would repeat certain commands a predetermined number of times [45]; Comprehending loops with multiple steps or instructions [49]Possibly related to difficulty in understanding the loop representation [49]
Incorrect loop countsDebugging loop tasks (recognize missing/wrong counters) [46]; Comprehending how a multi-step program repeats certain commands a predetermined number of times [45]; Comprehending loops when they incorporate two or more instructions into a single repetition block [49]-
Dependence on trial-and-error approachChallenges in activities that require combining multiple programming structures, such as sequences, loops, and selection structures [52,54]; Challenges when debugging loop tasks [46]Possibly related to “Support methods are not effective for students” [53]
Coordination of multiple loops and commandsChallenges in activities that require combining multiple programming structures, such as sequences, loops, and selection structures [52,54]-
Simple loops only (no nested loops)Comprehending loops with multiple instructions [49];
Challenges combining multiple programming structures such as sequences and loops [52,54]
Possibly related to difficulty in understanding the loop representation [49]
Limited optimization-Possibly reinforced by the instructional context that does not strongly emphasize code efficiency
Orientation errors/Confusion from the left, right turn commands Orientation problems due to limited spatial skills of younger students or due to user interface symbols “Decoding” [20,41,42]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Giannakoulas, A.; Xinogalos, S. An Exploratory Mixed-Methods Study of Sixth-Grade Primary School Students’ Problem-Solving Strategies and Difficulties with Loops in the Educational Programming Game Rapid Router. Computers 2026, 15, 645. https://doi.org/10.3390/computers15100645

AMA Style

Giannakoulas A, Xinogalos S. An Exploratory Mixed-Methods Study of Sixth-Grade Primary School Students’ Problem-Solving Strategies and Difficulties with Loops in the Educational Programming Game Rapid Router. Computers. 2026; 15(10):645. https://doi.org/10.3390/computers15100645

Chicago/Turabian Style

Giannakoulas, Andreas, and Stelios Xinogalos. 2026. "An Exploratory Mixed-Methods Study of Sixth-Grade Primary School Students’ Problem-Solving Strategies and Difficulties with Loops in the Educational Programming Game Rapid Router" Computers 15, no. 10: 645. https://doi.org/10.3390/computers15100645

APA Style

Giannakoulas, A., & Xinogalos, S. (2026). An Exploratory Mixed-Methods Study of Sixth-Grade Primary School Students’ Problem-Solving Strategies and Difficulties with Loops in the Educational Programming Game Rapid Router. Computers, 15(10), 645. https://doi.org/10.3390/computers15100645

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop