2. Theoretical and Empirical Background on Scratch in Primary Education
Scratch, a block-based programming environment, has been widely adopted in primary education for introducing core concepts of programming and computational thinking. Across studies, Scratch is associated with gains in computational thinking, student motivation, and cross-curricular learning, though evidence on its direct impact on sustained attention is still limited.
Computational thinking and conceptual learning are areas in which Scratch is found to be useful, as a tool that encourages further development of these skills and their implementation in education settings. Systematic reviews and empirical studies report that Scratch can scaffold computational thinking practices (e.g., sequencing, abstraction and decomposition) in primary classrooms [
6,
8,
19]. Classroom implementations and design-based studies further indicate that Scratch supports conceptual learning in mathematics and science by enabling students to externalize and test ideas through code artifacts [
10,
14,
20]. Scratch projects are also useful tools for the evaluation of the computational thinking abilities of students [
21]. The adaptability of Scratch for different levels of computational thinking is acknowledged in [
22], where it is stated that by using Scratch, teachers can create more effective institutional and learning objectives to support students’ learning, as Scratch can be used for both “low-floor” and “high-ceiling” projects. Computational thinking is important as it is recognized for improving science literacy and consequently advancing SDG 4 [
23]. Developing computational thinking and conceptual learning enhances students’ ability to acquire and develop problem-solving skills. By positively influencing the development of these skills, Scratch can lead to the needed changes in education.
The influence of Scratch on education is further supported by its cross-curricular application, which enables the benefits of using this tool in classes to be applied across various subjects. Scratch has been integrated across subjects (mathematics, science, language arts, and the arts), often within constructionist or project-based pedagogies that emphasize making and iteration [
7,
10,
14,
20,
21,
22,
24]. Case studies over multiple schools highlight the feasibility and teacher uptake when Scratch is embedded into the regular curriculum rather than treated as an extracurricular add-on [
7]. Design work with pre-service teachers shows how task structures, scaffolds, and assessment rubrics can align Scratch projects with curriculum goals [
9]. The integration across disciplines supports SDG 4, especially Target 4.7, which emphasizes education for sustainable development, global citizenship, and appreciation of cultural diversity.
Due to previously stated attributes of Scratch, its impact on motivation, engagement, and creativity should be taken into account as an additional benefit that can result from its usage in classes. Multiple studies find that creating with Scratch relates to higher motivation, enjoyment, and self-expression, including through digital storytelling and game-based tasks [
5,
11,
13,
15]. Studies on teachers’ acceptance suggest generally positive perceptions of Scratch’s usefulness and ease of integration in instruction [
25,
26]. However, some findings are mixed regarding near-term transfer to problem-solving performance; in at least one study, learners reported enjoyment and interest without significant measured gains on problem-solving tests [
5]. From the perspective of SDG 4, using Scratch is appealing, as it increases motivation, engagement, and creativity and aligns with Target 4.7 (education for sustainable development and global citizenship) and Target 4.4 (acquiring relevant skills for financial success). To achieve these goals and align education with the set Targets, it is of fundamental importance to foster collaboration and provide equal opportunities for all students. One of the major benefits of Scratch is that it provides equal opportunities for all students. Opportunities to work collaboratively provide great support to students for developing problem-solving skills and preparing for real-life tasks. Pair-programming and collaborative project work in Scratch have been linked to sustained motivation and comparable performance across genders, suggesting potential for equitable participation in computing activities [
27]. Instruments developed to measure teachers’ perceptions of Scratch’s contribution to programming instruction also point to broad support for its collaborative affordances [
26]. When students work on collaborative Scratch projects, they can incorporate their backgrounds and interests, catering to diverse learning styles [
28]. These findings suggest that the benefits of using Scratch are connected and that one change introduced by Scratch in education leads to other positive changes. Collaborative activities lead to more equal education and increase students’ awareness of diversity in education. Scratch influences equality in education directly as well. Using Scratch is a good model for equality because it lowers barriers (such as geography and resources) and supports inclusive practices [
29]. Scratch-based collaborative learning and impact on equality directly support Target 4.1 (free primary and secondary education), which refers to quality education available for all, Target 4.4 (relevant skills for financial success), Target 4.5 (eliminate all discrimination in education), and Target 4.7 (education for sustainable development and global citizenship).
SDG 4’s Target 4.2 (equal access to quality pre-primary education) explicitly underscores the importance of early childhood development, care, and pre-primary education. Scratch can support this goal by allowing the introduction of technology early in education, thereby strengthening the development of problem-solving skills. ScratchJr extends block-based creation to early childhood (ages 5–7), laying the groundwork for a developmental pathway into later Scratch activities and fostering early digital literacy [
30]. Studies using Scratch with younger learners emphasize playful creation and narrative as bridges to foundational computational concepts [
11,
30]. Already, with a focus on these positive outcomes, it can be noted that Scratch, when implemented properly in education, can lead to deep and systematic changes that result in greater alignment with SDG 4. Scratch is an important tool as it goes beyond general computing skills. Scratch has been used to teach or reinforce domain-specific content, including mathematics (reasoning, representation, and problem structuring) [
10], physics (e.g., dynamics and mechanics through simulation/animation) [
20], and language learning (dialogue creation and multimodal composition) [
13]. Additional reports document applications in engineering education via problem-based game projects [
16] and teacher education contexts [
9,
24]. The possibility of its narrowed usage allows addressing adjusted goals in education to the concrete needs of the students in the classroom.
An area of special interest is the attention span among students and the role of Scratch in addressing challenges that arise from decreased attention span. A broader body of research emphasizes that maintaining students’ attention in class remains a persistent challenge. Studies consistently show that student attention tends to decline after 10–15 min of instruction, highlighting the difficulty of sustaining engagement during lessons [
1,
2]. Teachers and students themselves report that loss of focus and attention problems are common in the classroom environment [
3]. These findings state the problem that needs to be resolved. Innovative solutions are discussed as a potential path towards addressing the problem of maintaining attention during lessons. The digitalization of classes is noted as one possible solution. Well-designed digital activities—such as robotics, storytelling with audiovisual support, and adaptive educational software—have been shown to positively influence students’ focus and on-task behavior [
4,
17,
18,
31]. Local research on educational software also points to its broader impact on the effectiveness of teaching and learning models [
32], reinforcing the relevance of integrating digital tools into primary education.
Within the Scratch literature, however, direct measurement of sustained attention (e.g., frequency or duration of lapses and self-reports triangulated with observation) remains comparatively underexplored. Most studies predominantly report on motivation, engagement, creativity, or problem-solving outcomes rather than fine-grained attention metrics [
5,
6,
7,
8,
9,
10,
11,
13,
15,
16,
19,
27,
33]. This leaves a gap that should be further addressed, as due to the main characteristics of Scratch, it is justified to assume that its usage in classes can influence attention span, focusing mostly on its capacity to increase student motivation and engagement. This gap motivates the present study’s focus on whether—and under which conditions—Scratch activities are associated with increased attention during lessons, in alignment with SDG 4’s emphasis on inclusive and effective learning environments.
3. Materials and Methods
In this paper, both qualitative and quantitative approaches were employed to provide a comprehensive analysis of the research questions regarding the impact of Scratch on students’ attention spans. Observation dates were coordinated with school staff, and class sizes are detailed in the
Supplementary Materials. The research was conducted over 12 sessions, including six sessions for the fourth-grade students (three experimental and three control) and six for the third-grade students. The first series of lessons was conducted traditionally, without the use of educational software (control group), while the second series incorporated the Scratch educational software (experimental group). At the outset, students were informed that their responses would remain confidential, and parents were fully briefed on the study’s purpose. This approach aligns with SDG 4: Quality Education, emphasizing the use of inclusive and innovative digital tools to enhance learning outcomes.
Students from the 3rd and 4th grades of primary school in Novi Sad, Serbia, were included in the study. Each grade was divided into a control group and an experimental group. Parental consent was obtained prior to participation to ensure ethical compliance and the protection of minors. The design allows for a controlled comparison of Scratch’s effect on attention span across different age groups.
The questionnaire was adapted from [
34] to align with the age of the respondents, the subject matter, and the study’s goals. While self-assessment instruments have inherent limitations, these were minimized given the simplicity and clarity of the items. Participation was anonymous, and students were clearly instructed on how to complete the questionnaire. Two items addressing loss of attention (“I’m bored with programming” and “I wonder what’s the point of programming”) were based on [
2] and included on a Likert scale to quantify student experiences. This instrument directly supports testing the research’s hypotheses (H1–H3) regarding Scratch’s effect on attention span, potential gender differences, and the role of problem-solving activities.
Quantitative data were analyzed using both descriptive and inferential statistics. For Likert-scale items, frequency distributions, medians, and interquartile ranges were reported in line with recommendations for ordinal data [
35,
36]. To compare control and experimental groups, the Mann–Whitney U test was employed as a nonparametric alternative to the independent
t-test. Internal consistency of the questionnaire was assessed using Cronbach’s alpha. For effect size, the probability of superiority statistic was calculated [
35], providing an interpretable measure of group differences for nonparametric data. All analyses were conducted in SPSS 30.0 and JASP 0.19.2.0.
Qualitative data from interviews were analyzed thematically and comparatively to evaluate differences between groups, providing further insight into students’ experiences.
The methodology allows for testing the following hypotheses:
H1. The use of Scratch increases the time until students’ attention is interrupted in informatics classes.
H2. The effect of Scratch on attention span does not differ depending on student gender.
H3. Problem-solving activities in Scratch are positively associated with increases in attention span.
This combined quantitative and qualitative approach ensures a rigorous evaluation of Scratch as an educational tool, its potential to sustain student attention, and its contribution to inclusive and innovative learning environments. The study’s design directly aligns with SDG 4: Quality Education by investigating the effectiveness of digital educational tools in promoting student engagement, critical thinking, and equitable learning opportunities.
4. Results
A total of 89 respondents participated in the research, including 50 male respondents and 39 female respondents. The respondents were third and fourth graders, comprising 45 third graders and 44 fourth graders.
The participants were divided into two groups: the control group and the experimental group. The design was applied in both grades. As a result, the findings of this research can be applied to students in both third and fourth grades. Additionally, the results can be compared across genders to identify any differences that should be considered when evaluating the impact of using the Scratch educational program in the classroom. In the third grade, there were 21 students in the control group and 24 students in the experimental group, while in the fourth grade, there were 22 students in both groups (control and experimental).
The results of the research provide significant insights into the effects of Scratch on sustained attention. The reliability analysis indicated that both instruments demonstrated excellent internal consistency. For the learning activities (LA) scale, which measured attention across classroom activities (LA1–LA8), Cronbach’s Alpha was 0.946, based on eight items. This result suggests that the items were highly consistent and measured the same underlying construct of perceived attention during different learning tasks. For the R scale, which captured reasons for attention loss (R1–R14), Cronbach’s Alpha reached 0.978 across fourteen items. Such a high coefficient confirms very strong internal consistency, though it may also indicate some redundancy among the items, as several questions may reflect similar aspects of disengagement. Overall, these findings confirm that both instruments are highly reliable, providing a solid basis for subsequent analyses and interpretations.
The descriptive statistics based on medians and interquartile ranges (IQRs) provide a clear picture of how students in different groups perceived various classroom activities with respect to sustaining attention (see
Table 1).
Responses to the teacher’s questions (LA1) were consistently rated at a moderate level across all groups (Median = 3, IQR = 0), suggesting stable perceptions with no variability. This stability implies that teacher questioning maintained a uniform level of engagement among students. Oral explanations of the material (LA2) received the lowest ratings (Median = 2) in all groups, with higher variability in the control groups (IQR = 2) compared to the experimental groups (IQR = 1). These findings suggest that teacher-centered explanations were generally perceived as less engaging, whereas the use of digital tools in experimental settings appeared to yield more consistent evaluations.
When examining more interactive forms of learning, activities involving active participation (LA3) were rated highest (Median = 4) across all groups, confirming that interactive learning strongly sustains attention. However, the experimental groups displayed greater variability (IQR = 2) than the control groups (IQR = 1), suggesting that while interactive approaches were broadly effective, individual differences influenced students’ levels of engagement. Turning to more traditional learning resources, the textbook (LA4) and workbook tasks (LA5) generally received moderate ratings (Median = 3). Still, the third-grade experimental group rated textbook tasks lower (Median = 2), which may reflect a decline in the perceived relevance of traditional assignments when digital tools are incorporated into instruction. A comparable pattern was observed in group tasks (LA6), which were also rated moderately (Median = 3), with higher variability in control groups (IQR = 2) compared to experimental ones (IQR = 1). This finding suggests that Scratch-supported tasks provided more consistent engagement in collaborative settings. Similarly, video activities (LA7) were generally rated highly (Median = 4), except in the 4th-grade control group, where the median dropped to 3. This difference highlights the added value of integrating digital tools to enhance attentional focus. Finally, web-based activities (LA8) received consistently high ratings (Median = 4, IQR = 1) across all groups, indicating strong and stable engagement with online content.
Overall, these results demonstrate that interactive and digital activities, such as active participation, video tasks, and web-based tasks, are most effective in sustaining student attention. In contrast, traditional methods, including oral explanations and textbook tasks, are less engaging. Experimental groups consistently showed lower variability in responses, pointing to the stabilizing effect of Scratch and digital approaches on students’ perception of attentional focus.
As it has been established that Scratch has a positive impact on attention span and contributes to helping students maintain their attention, it is important to analyze whether there is a difference in this influence among genders. The results show that median values for male and female students were nearly identical across most activities, suggesting that gender does not significantly influence sustained attention (see
Table 2).
For LA1 (Responses to teacher’s questions), both groups had a median of 3, with slightly greater variability among boys (IQR = 1) compared to girls (IQR = 0). This difference was not statistically significant (p = 0.443). For LA2 (Oral explanations), the median remained low (2) for both genders, with an equal IQR = 1. Although girls’ responses were somewhat more consistent, the difference was not significant (p = 0.090). In LA3 (Active Participation Tasks), both groups reported a median score of 4. Still, variability was higher among boys (IQR = 2) compared to girls (IQR = 1), indicating that girls rated these tasks more consistently as sustaining attention. The difference was not statistically significant (p = 0.292). For LA4 and LA5 (Tasks from textbooks and Workbook tasks), the median value was 3 in both groups. Girls’ responses were more uniform (IQR = 0) compared to boys (IQR = 1), but the differences, although approaching significance in LA4 (p = 0.081), were not statistically confirmed. In LA6 (Group tasks), both genders had a median of 3, with boys again showing greater variability (IQR = 2 vs. 1). The p-value (0.072) indicated that the difference was close to significance but did not reach the conventional threshold of statistical significance. For LA7 (Video activities), both genders rated these activities highly (median = 4, IQR = 1), with no significant difference (p = 0.143).
The only statistically significant difference was observed for LA8 (Web activities). Both groups reported the same median (4) and IQR (1), but the p-value (p = 0.032) indicates that girls rated web-based activities as more effective for sustaining attention compared to boys.
Overall, the results reveal a consistent pattern across activities, suggesting that gender does not significantly influence students’ attention during most tasks. The single significant result for web-based activities (LA8) highlights that girls may find technology-supported activities more engaging or better aligned with their learning preferences. These findings provide sufficient evidence to support H2, suggesting the need to further explore whether there is a fundamental difference in digital activity types.
The Mann–Whitney U test was conducted to examine potential gender differences in students’ attention across the measured activities (LA1–LA8). The results showed that there were no statistically significant differences between male and female students for most variables (
p > 0.05) (see
Table 3). The only exception was observed for LA8 (web activities), where female students demonstrated slightly higher levels of attention compared to male students (U = 737.5, Z = −2.15,
p = 0.032).
These findings suggest that gender did not systematically influence attention in the observed learning activities, thereby supporting Hypothesis H2. The observed difference in web-based activities may be interpreted as a task-specific effect rather than a general trend. This aligns with previous literature indicating that Scratch and similar digital learning environments foster equitable participation across genders [
26,
27].
The research connected problem-solving skills and attention span among students. Spearman’s rank correlation was conducted on problem-solving activities (LA3, LA6, LA7, and LA8) to examine their associations with sustained attention (see
Table 4). The strength of correlation coefficients was interpreted using the conventional thresholds proposed by Cohen: ρ < 0.30 indicates a weak correlation, 0.30–0.50 a moderate correlation, 0.50–0.70 a strong correlation, and values above 0.70 a very strong correlation [
37].
The analysis of Spearman correlations between problem-solving activities (LA3, LA6, LA7, and LA8) revealed uniformly positive and statistically significant associations (p < 0.01). The strongest correlation was observed between active participation tasks (LA3) and group work (LA6), with a very strong coefficient (ρ = 0.840), indicating that students who remained attentive during individual active tasks were also highly engaged in collaborative activities. Similarly, very strong correlations were found between LA3 and LA8 (ρ = 0.762), LA6 and LA8 (ρ = 0.774), and LA7 and LA8 (ρ = 0.714), suggesting that attention in problem-solving contexts extends consistently to multimedia and web-based activities. Strong correlations were also observed between LA3 and LA7 (ρ = 0.602) and between LA6 and LA7 (ρ = 0.681), highlighting the reinforcing role of video materials in sustaining focus during active and collaborative tasks.
Overall, these results indicate that problem-solving activities supported by Scratch not only maintain attention but also show a coherent pattern of reinforcement across task types. The convergence of very strong correlations underscores that students’ sustained attention is mutually supported when learning combines active participation, collaboration, and multimedia elements. This provides robust evidence in support of H3, confirming that Scratch-based problem-solving activities are positively and strongly associated with increased attention span.
To further understand the dynamics of students’ attention, the analysis is focused on the factors that contribute to attention loss. Examining these reasons complements the previous findings by highlighting not only when attention is sustained but also the circumstances under which it may waver. The analysis of median and interquartile range (IQR) values for reasons of attention loss (R1–R14) revealed that most reasons were reported at moderate levels (Mdn = 2), indicating that students did not frequently experience strong distractions during lessons (see
Table 5). The most prevalent reasons were R2—Thinking about other things and R4—I was bored, both with a median of 3, suggesting that distraction and boredom were the most common causes of attention loss.
Notably, several items demonstrated differences between the control and experimental groups. For R4 (boredom), R5 (lesson was too long), and R8 (loss of interest), the control groups reported higher medians (3) compared to the experimental groups (Mdn = 2), with narrower IQR values in the experimental groups. This indicates that students in the control condition experienced boredom and loss of interest more frequently. At the same time, those in the Scratch-based experimental groups reported these reasons less often and more consistently. For the remaining items (R1, R3, and R6–R14), the median remained at two across groups, suggesting that Scratch had no substantial impact on factors such as difficulty in following the content, familiarity with the material, or perceiving the lesson as a waste of time.
Overall, the findings highlight distraction (R2) and boredom (R4) as the most critical challenges to maintaining attention. However, the use of Scratch appeared to mitigate some typical reasons for disengagement, particularly reducing boredom, perceptions of excessive lesson length, and loss of interest. These results provide additional support for Hypothesis H1, suggesting that Scratch-based instruction fosters more sustained and focused attention compared to traditional teaching.
The Kruskal–Wallis test was conducted to examine group differences in reasons for attention loss (R1–R14) across the four groups (third-grade control, third-grade experimental, fourth-grade control, and fourth-grade experimental) (see
Table 6). The results showed that for most items, including R1 (unclear focus), R2 (thinking about other things), R3 (difficult to follow), R4 (boredom), R6 (already familiar), R7 (waste of time), and R9–R14, there were no statistically significant differences between groups (
p > 0.05).
However, two items reached statistical significance. For R5 (It was too long for me), the Kruskal–Wallis test indicated a significant difference between groups (χ2 ≈ 9.2, p = 0.026). Similarly, for R8 (I lost interest), a significant difference was found (χ2 ≈ 10.7, p = 0.014). In both cases, the experimental groups reported lower median values and narrower IQRs compared to the control groups, suggesting that Scratch-based instruction reduced perceptions of lessons being too long and decreased reports of lost interest.
These findings indicate that while most reasons for attention loss were reported similarly across groups, Scratch-based teaching had a significant impact on mitigating two of the most common negative experiences related to sustained attention. This provides additional empirical support for Hypothesis H1 by showing that experimental groups experienced fewer interruptions in attention due to boredom and disinterest.
6. Conclusions
This study investigated the impact of Scratch-based learning on sustaining the attention of primary school students during informatics classes. The results consistently showed that interactive and digital activities—such as active participation, video, and web-based tasks—were most effective in maintaining focus. In contrast, traditional approaches, including oral explanations and textbook tasks, elicited lower ratings of attention. These findings provide strong support for Hypothesis H1, indicating that Scratch not only sustains but also stabilizes attention across diverse learning contexts. Moreover, Scratch significantly reduced common reasons for disengagement, particularly perceptions of excessive lesson length (R5) and loss of interest (R8), thereby mitigating two of the most prevalent barriers to sustained attention.
With respect to Hypothesis H2, gender differences in sustained attention were largely absent. Male and female students reported comparable levels of attentional focus across most activities, with only a minor difference in web-based activities (LA8), where girls indicated slightly higher attention. This supports earlier findings that Scratch fosters equitable participation and engagement independent of gender, reinforcing its role in promoting inclusivity in computing education.
Hypothesis H3 was also confirmed. The correlation analysis revealed strong and very strong positive associations between problem-solving activities, particularly between active participation (LA3) and group work (LA6), as well as their links with video (LA7) and web activities (LA8). These results suggest that students’ attention is mutually reinforced when learning combines individual engagement, collaboration, and multimedia resources, highlighting Scratch’s integrative and multimodal potential.
Taken together, the results underline Scratch’s pedagogical value as a tool that not only enhances attention but also fosters equity and collaboration in the classroom. The findings align with Sustainable Development Goal 4 (SDG 4: Quality Education), as Scratch supports inclusive and innovative teaching practices that enhance student motivation and attentional stability.
Nonetheless, some limitations should be acknowledged. The study relied on self-reported measures of attention, which reflect perceptions rather than direct behavioral or neurocognitive evidence. Furthermore, the sample was limited to third- and fourth-grade students in a single educational context, which restricts the generalizability of the findings. Future research should therefore employ mixed-methods and longitudinal designs, incorporate objective measures of attention (e.g., eye-tracking and physiological monitoring), and extend the investigation to additional subjects and age groups.
In conclusion, Scratch demonstrates substantial potential as a digital educational tool for sustaining attention, reducing disengagement, and supporting equity in learning. By embedding problem-solving, collaborative, and multimedia activities into informatics instruction, educators can create more engaging and inclusive classrooms, thereby advancing both pedagogical practice and the global objectives of SDG 4.