Introduction

Computer programming instruction incorporates mathematical, physical, and process simulation combined, while also placing students in a programmer’s role to explore possible careers involving science and discovery, space exploration, drone operation, cybersecurity, and other invaluable possibilities. Researchers and educational practitioners, as well as policy makers, repeatedly urge that waiting until students are in a four-year college to learn computer programming is no longer a viable option (State of Computer Science Education, 2021; Armoni 2012; Kumar, 2014; Prottsman, 2014). Students will need to learn and practice computational thinking and skills throughout PreK-12 to be better prepared when entering their college degree programs or careers related to computer science and technology.

A multitude of visual and block-based programming tools and applications, such as Scratch, have enabled the learning of programming to become more commonplace and friendlier for children (Armoni et al., 2015; Grover et al., 2015; Gutierrez et al., 2018; Lewis, 2010; Maloney et al., 2008; Maloney et al., 2010; Weintrop & Wilensky, 2017). The growing body of literature related to computer science education in a K-12 setting suggests that young children are capable of learning computational concepts and practices at an early age (Namukasa et al., 2015; Rich et al., 2019; Tran, 2019; Saez-Lopez et al., 2016). This puts early computing education at the forefront and creates an imperative need to develop an informed body of knowledge about learning and teaching computer science and computational thinking in an elementary education setting. Although there are several connections among math and programming and highly correlated relationships between computer programming and success in mathematics (Bubnó & Takács, 2019; Razak & Ismail, 2018), this connection is uncommon in today’s educational curriculum (Neri, 2021; Wright et al., 2013). Current literature highlights the needs for the interdisciplinary integration between computer science and mathematics education (Bubnó & Takács, 2019; Fisler et al., 2021), suggesting a knowledge gap on the integration of both disciplines (Powers & Azhar, 2020).

Benefits of programming and computer science instruction

The benefits of computer programming have been long documented in the United States since Seymour Papert incorporated Logo programming in elementary education in the 1970s to the 1990s. When Logo programming tools were made accessible to young learners, they created a powerful learning experience for these elementary learners (Harel & Papert, 1990; Papert, 1980; Papert et al., 1979). Later research consistently reported learning gains in the areas of improved geometric knowledge, logical reasoning, and spatial ability through the use of Logo (Clements, 2002; Clements et al., 2001; Subhi, 1999).

In the 21st century, teachers have increasingly been asked to teach computer science concepts and skills to younger children and integrate it into learning activities (Barr & Stephenson, 2011; Fluck et al., 2016; Google Inc. & Gallup Inc., 2016; Powers & Azhar 2020). This call was rooted in a multitude of research demonstrating various areas of impact for universal computer science education in the society: (1) economic and workforce development (2) equity and social justice, (3) competencies and literacies, (4) citizenship and civic life, (5) scientific, technological, and social innovation, (6) school improvement and reform, and (7) fun, fulfillment, and personal agency (Vogel et al., 2017). Vogel et al. (2017) underscored that computer science presents an interesting, innovative challenge, which evokes curiosity among K-12 students. As a pedagogical practice, it increases higher-order thinking skills and strengthens problem-solving capabilities and stamina (Atmatzidou & Demetriadis, 2016; Lee & Cho, 2019; Matere et al., 2021). These practice-based computer science lessons allow for hands-on, project-based learning.

Visual programming tools and environments such as Scratch, Scratch Jr., Snap!, and App Inventor are becoming increasingly popular in K-12 educational contexts (Grover & Pea 2013; Flannery et al., 2013; Morelli et al., 2011; Saritepeci, 2020; Scherer et al., 2020). Saez-Lopez et al. (2016) performed a quasi-experimental study, which highlighted significant improvements regarding the learning of programming concepts, logic, and computational practices among 5th- and 6th-grade students utilizing the visual programming language–Scratch. Middle schoolers often have progressed to more game-based and creation activities (Garneli, 2015). When encouraged to high-school students, learning the programming concepts may support metacognition, further promoting problem-solving skills and creativity (Gim, 2021).

Computer Science Integration in Elementary Education

Despite the multiple benefits of computer science instruction, such incorporation into an existing K-12 curriculum is not without challenges. While computer science has been an increasingly common subject area in secondary education, this subject has mostly been taught in high school levels through advanced placement program (Rich et al., 2019), as computer science or programming as a skillset is not often deemed as age-appropriate for elementary learners. Therefore, a more inclusive and all-encompassing concept, computational thinking (CT), has progressively gained traction amongst researchers and practitioners (Lye & Koh, 2014; Rich & Hodges, 2017; Rich et al., 2019; Shute et al., 2017).

Although there has been a slew of multiple definitions describing computational thinking (Shute et al., 2017), the majority of literature on CT falls back on Jeannette Wing’s definition emphasizing that CT being the way of thinking at multiple levels of abstraction involved in formulating problems and solutions applicable to all fields (Wing, 2006). Using the simplest terms, computational thinking is defined as thinking and solving problems like a computer, or to solving problems using a computational approach. Angeli et al., (2016) presented a computational thinking curriculum framework that incorporates indicators of competence for all given CT skills; namely: abstraction, generalization, decomposition, algorithmic thinking, and debugging. Teaching CT skills at a younger age denotes a way of teaching students to think about their day-to-day activities and solving problems algorithmically, which is a set of much broader fundamental skills than the specific skillset represented in the field of computer science. Researchers recommended that CT as a fundamental skill should be learned in early years of education so that application may continue throughout the student’s educational journey (Barr & Stephenson, 2011; Coşar & Özdemir, 2020; Lu & Fletcher, 2009; Mladenović et al., 2021; Qualls & Sherrell, 2010).

While research shows decades of work regarding how to make programming more accessible to high school students, it is still unclear how to bring this content into elementary school classrooms (Weintrop et al., 2017). Many teachers at the elementary education level often shy themselves away from anything related to CT due to their misconceptions equating CT with coding. This in part may have been caused by administrators not preferring more coursework being added to present curricula, in fear of risking test scores and teacher apprehension (Burke, 2016). The wide varieties of technologies associated with computer science and CT (i.e., drag-and-drop type of coding, script-based programming, robotics) often make teachers uneasy and intimidated (Sadik et al., 2017; Mouza et al., 2018). Elementary teachers are reportedly facing exacerbating challenges, comprised of a lack of access to technology, inflexible curriculum, and inadequate planning time (Staples et al., 2005). Consequently, elementary teachers frequently struggle with seeing the CT and computer science integration being connected to the subject areas that they teach in the classroom.

Although companies and organizations like ISTE, Code.org, and Google have produced numerous resources, most materials and resources are geared towards pull-out programs rather than integration; meanwhile, studies repeatedly call for integration into the existing curriculum as a more effective method of teaching CS as compared to teaching as a standalone subject course (Barr & Stephenson, 2011; Garneli et al., 2015). The multitude of coding modules and lessons available online may also seem overwhelming. This has caused confusion and frustration amongst educators about ways to create the best integration strategies for already existing standards or subject areas in order to achieve the highest levels of success (Denning, 2017; Garneli et al., 2015).

The aforementioned challenges may also be due to a perception that programming concepts are found to be difficult and abstract (Akinola, 2015; Noh & Lee, 2020; Sáez-López et al., 2016). However, learning a complex subject can be facilitated effectively through a suitable instructional approach (e.g., scaffolding) (Caglar et al., 2018). For example, elementary students—who are typically 7 to 11 years old—may struggle from learning an abstract concept as they start to develop logic reasoning (Piaget, 1964). Therefore, selecting and sequencing suitable instructional tools and programming concepts are imperative and should align with the students’ context (e.g., age and grade level) (Mladenović et al., 2021).

Students can be introduced to the foundation of programming concepts through block-based coding tools (e.g., Scratch and code.org) initially. Particularly, this type of coding tools can assist students in visualizing the concept, manipulating the elements, and comprehending the programming logic through the blocks, rather than memorizing and recalling the coding script (Lambić et al., 2020; Rodríguez-Martínez et al., 2020; Vasconcelos & Kim, 2020) that may cause cognitive load for early programming learners (Lye & Koh, 2014; Vasconcelos & Kim, 2020). Essentially, these tools provide a visual representation of the programming concepts that students may otherwise perceive as difficult and abstract (Mladenović et al., 2021) and promote user engagement because they provide instant visual feedback after the code execution (Lye & Koh, 2014; Vasconcelos & Kim, 2020). As a result, learning programming can be interesting, enjoyable, and motivating, triggering students’ desire to learn more (Coşar & Özdemir, 2020; Kumar, 2014; Lakanen & Kärkkäinen, 2019; Lambić et al., 2020) and promoting a career aspiration in a related discipline (Lakanen & Kärkkäinen, 2019).

Once the students have the knowledge foundation, they can try a more complex programming activity, such as by learning the programming language syntax or the textual programming. As a start, teaching the programming language may utilize Python (Mladenović et al., 2021). It is deemed appropriate to introduce the programming language to beginners such as K-12 students (Lee & Cho, 2019; Mladenović et al., 2021).

Bridging Computer Science and Mathematics Education

Prior research has suggested various correlations between students’ learning of mathematical concepts and abilities and their learning of computer programming (Bubnó & Takács, 2019; Clements, 2002; Clements et al., 2001; Mladenović et al., 2021; Razak & Ismail, 2018; Relkin et al., 2021; Rich et al., 2013; Tran, 2019), which motivated educators to use the Logo Programming Language and its connection to geometry (Burke, 2016) Burke (2016) and Gim (2021) contended that coding is in essence grounded in mathematics. Wright et al., (2013) described a full, in-school curriculum and software package called Bootstrap, which taught students how to program their own video games while making connections to algebra (Schanzer, 2015). This study suggested an increased students’ understanding of algebraic functions and variables, while also presenting evidence of using Racket programming language to energize students’ math learning. Other studies similarly highlighted the effect of teaching programming using Scratch. Scratch can provide students a new perspective regarding math-related concepts and processes (Benton et al., 2017; Calder, 2010; Hughes et al., 2017), potentially because it promoted the skills needed to comprehend math such as critical thinking and metacognitive skills (Rodríguez-Martínez et al., 2020). It is not a surprise some teachers may perceive the connection between programming concepts and math and science instructions (Neri, 2021; Rich et al., 2019). Basawapatna et al. (2010) emphasized that the implementation of computer science concepts while participating in video game creation activities could be used as a springboard to advancing their computational thinking. Overall, both middle-school and high-school students can take advantage of learning programming to boost their computational thinking skills (Noh & Lee, 2020), in with mathematical abilities play an imperative role in learning programming (Soboleva et al., 2021).

Students were also reported to enjoy, remain motivated, and build confidence in the programming-infused learning environments (Coşar & Özdemir, 2020; Gim, 2021; Hsu et al., 2018; Lambić et al., 2020; Romero & Lepage, 2017; Scherer et al., 2020; Saritepeci, 2020; Tran, 2019). In the Basawapatna et al. (2010) study, when asked if they enjoyed designing games on the computer, 100% of surveyed students chose the response, “Strongly agree.” Similarly, student participants, who were third-grade students, in Tran’s (2019) study enjoyed the computational thinking learning activities due to the unique learning opportunity that was not typically found in traditional lessons. Lambert & Guiffre (2009) indicated improved confidence and interest in Computer Science and Math seen in elementary school children after conducting a computer science outreach containing a series of “unplugged” computer science lessons that did not involve a physical computer. Meyer and Batzner (2016) conducted a study consisting of 450 9- to 10-year-old students from 22 to 33 elementary schoolers. The results concluded that all of the participants enjoyed the course and would like to participate again. Belanger et al., (2018) reported a study showing an increase in student confidence in categories related to the ability to do math, the ability to give directions and the ability to someday build a computer after teaching three common lessons of computational thinking. Saez-Lopez et al. (2016) also reported students’ perceived enjoyment of Scratch-supported computer science activities and enhanced motivation, in addition to their improved understanding of computational concepts and practices. Although programming lessons may be initially perceived challenging, elementary students can potentially change their misconceptions about the programming concepts and thereby enjoying learning it, feeling accomplished by the end of a lesson, and desiring to continue their learning path (Gim, 2021).

Since programming is related to mathematical concepts (Bubnó & Takács, 2019; Clements, 2002; Clements et al., 2001; Mladenović et al., 2021; Niemelä & Helevirta, 2017; Razak & Ismail, 2018; Relkin et al., 2021; Rich et al., 2013; Tran, 2019), it is imperative to help students recognize the transferable skills they gain from learning programming to learning math. Transfer of learning is deemed essential as it can transform students’ understanding of the concept to realizing the connection with other contexts, promoting their metacognition and meaningful learning (Niemelä & Helevirta, 2017). As a result, students will potentially be able to grasp the common fundamental concepts of different domains and apply them in various contexts (Niemelä & Helevirta, 2017). Racket can be utilized to teach programming and simultaneously assist students to focus on transferring knowledge between math and programming and vice versa (Niemelä et al., 2017). Racket, a math-friendly functional programming language, offers image representation allowing students to visualize and manipulate algebraic expressions, and can pique the interests of elementary students (Felleisen & Krishnamurthi, 2009; Niemelä et al., 2017). However, some teachers may find it too complex to be used for teaching programming to elementary students (Niemelä & Helevirta, 2017). Therefore, the suggested learning path, if multiple coding tools are used, is to utilize Scratch, Phyton, and then Racket, which would be appropriate for early programming learners like the elementary students under study (Niemelä & Helevirta, 2017).

Purpose of the study

Extant literature has painted a mixed picture documenting both the successes and challenges of teaching CT and integrating computer science and programming in elementary education contexts (Fisler et al., 2021; Franklin et al., 2017; Manches & Plowman 2017; Seiter, 2015). Despite that computer science increases motivation, attitudes, and content retention among K-12 students, little research examines such an effect on elementary learners (Lambić et al., 2020). Despite the natural link between CT and mathematics and the needs for the interdisciplinary integration (Bubnó & Takács, 2019; Fisler et al., 2021), such an integration is still rarely practiced in educational curriculum (Neri, 2021) which suggests a significant knowledge gap (Powers & Azhar, 2020). In this study, we incorporated computer science instruction to strengthen math content connections among elementary school students. This study will offer insight as to what connections among the learning of basic computer science and programming tasks may affect the retention of mainstream curricula in math in addition to possibly increasing student motivation. The study was guided by three research questions:

  • RQ1: To what extent did students’ knowledge acquisition of mathematical and computational concepts improve after the computing activities?

    Ho: Students’ knowledge acquisition scores of mathematical and computational concepts did not improve after the computing activities.

  • RQ2: To what extent did students’ motivation change after the computing activities?

    Ho: Students’ motivation scores did not increase after the computing activities.

  • RQ3: How did elementary students perceive these computing activities?

Methods

A mixed methods approach was conducted to glean insight into the impact of the coding activities and participants’ overall experiences. The sequential explanatory strategy emerged as the qualitative data built upon the results of the quantitative data (Creswell & Clark, 2017).

Participants

A total of 51 students who were elementary learners belonging to two different sites of a Boys and Girls Club located in the southeastern U.S. participated in this study. The participants were drawn from a convenience sampling as one of the authors was an in-service teacher in the same school district. These participants attended the two local elementary schools, which repeatedly reported low standardized assessment scores in math. Amongst the 51 participants, 37.3% were third graders, 33.3% were in the fourth grade, and 29.4% were fifth graders. Approximately 98% of all students were considered low-income and received free or reduced lunch. In terms of racial makeup, the majority of the student sample population (90%) were Black, 2% Caucasian, 4% Hispanic, and 4% multiracial. Approximately 51% of students were females and 10% of students were classified as learning disabled and/or autistic.

Materials

In this study, students were exposed to three programming languages: Scratch, Python, and Racket. Scratch bridges the gap between block-based programming and more advanced text-based programming languages and provides students with no programming experience an innovative and interactive environment, allowing them to create programs, stories, and games using drag-and-drop blocks (See Fig. 1). Python is a suitable language for teaching beginners. One of the programs taught in this study is shown in Fig. 2 where students created a function, which drew an angle of choice. Students had to figure out that in order to produce the correct angle, they had to write the code to subtract their chosen angle from 180, which represents a straight line. Racket is a math-friendly functional programming language, which allows students to visualize algebraic expressions and therefore helps them easily transition from visual block programming languages to more sophisticated programming languages. In this study, Racket was extremely beneficial when students were asked to create algebraic expressions using a scale factor. Additionally, when students utilized the Wescheme web-based program using Racket, any errors or “bugs” in their code are explicitly identified and the student is then able to easily make corrections (See Fig. 3). The design of the instruction was partly guided by the Bootstrap curriculum (Schanzer, 2015) while continuing the ideas of transfer to specifically address math concept retention and connections.

Fig. 1
figure 1

 A screenshot showing the Scratch interface

Fig. 2
figure 2

 A screenshot showing the Python interface

Fig. 3
figure 3

 A screenshot showing the Wescheme web-based program

The nine, one-hour session lesson was designed to promote transfer as shown in Table 1. Video tutorials were used for three out of the nine instructional lessons to facilitate and reinforce students’ continuous content retention. During these lessons, students were taught how to write different examples of code to make math connections and how to create their own working computer programs. Table 1 demonstrates the learning objectives and the activities students were engaged in during the lessons.

Table 1 Math and Programming lesson objectives

Instrumentation

Knowledge retention. The knowledge retention test instrument was strategically crafted to mimic the 4th - and 5th -grade district-pacing guide content in addition to the Common Core State Standards for math. The 22-item test instrument included multiple choices and short answers questions targeting the following math and computer science content areas: the coordinate plane, variables, data types, syntax, algebraic expressions, word problems, angles, binary conversions, algorithms, loops, and debugging (See Table 2). The reliability coefficient of the knowledge retention test was calculated at 0.654.

Table 2 Structure of the Knowledge Retention Test Instrument

Motivation. A 9-item Likert-scale survey instrument was used to measure students’ motivation. Two items adapted from Papastergiou (2009) was used to measure any difference in student study motivation and feelings toward school in general. One item specifically addressed students’ motivation in math. The remaining six items were adapted from Belanger et al., (2018), which addressed students’ perceived usefulness of computer science and their confidence level with coding. To make the survey content more readable to elementary students, emoji images were used in combination with the text options. For example, a smiley face emoji was used for the agreeable options and a sad face was used for the disagreeable options. The reliability coefficient in the motivation survey was calculated at 0.736.

Procedures

The researchers first recruited participants from the local Boys and Girls Club based on the following criteria: (a) students who were daily Boys and Girls Club members, (b) students who attended the two local public elementary schools, (c) students recently completing the 3rd, 4th, or 5th grade. One researcher then attended a parent meeting to personally invite the students to participate in the computer science course. A pre-test of knowledge retention and pre-survey of motivation were distributed to all 51 students before the course commenced. In the next three weeks, two instructors taught a total of nine face-to-face classes and conducted activities to achieve the objectives listed in Table 1. After the course concluded, all 51 students participated in a post-test and post-survey. All students were also invited to participate in the one-on-one interviews to obtain richer information about student’s perceptions. The interviews were conducted after the post-test and post-survey were administered. A total of 46 students were interviewed, each of which lasted approximately 4–10 min.

Data Analysis

To investigate the effect of the computer science instruction on content retention and motivation (RQ1 and RQ2), we first used descriptive statistical analyses in SPSS to compare means and standard deviations of the test and survey items and then conducted a series of paired t-tests to examine to identify any statistical differences from students’ test scores and survey ratings between the pre- and post-conditions. Several assumptions needed to be met prior to running the t-test for repeated measures. The assumption that the differences between the pre- and post-tests have no outliers was tested by a visual inspection of a box plot, and no outliers were detected. The Shapiro-Wilk Test of Normality was significant (p = .039). Kolmogorov-Smirnov test of normality was not significant (p = .085) and the repeated measures t-test is reasonably robust against violations of normality (Wiedermann & von Eye, 2013). The nonparametric equivalent of the repeated measures t-test (Wilcoxon Signed Ranks Test) was also performed on each category based on the content areas due to violations of normality.

To better understand participants’ perceptions of the computer science instruction, student interviews were recorded, transcribed, and analyzed using an open-coding approach (Patton, 2002). Two researchers independently extracted patterns and themes from interview transcripts and further organized the data into meaningful categories. Quotations from the interviews were extracted to provide further insight into students’ perceptions of the computer science instructions. The two researchers then met and discussed about the disagreements and made decisions on the final themes to be included in the paper.

Ten interview questions were initially organized in the following categories: learning, content, and motivation. The learning category referred to students’ general perceptions of their experience in the computing lessons and activities, including what they liked or disliked about the class. It also inquired students’ learning preferences, what they learned, how well they learned, and whether they prefer typing the code or using the block-code method. If students stated they preferred typing the code, they were asked what they remembered creating after they had typed their code. The content category referred to several questions where students were assessed on certain content areas, such as describing an algorithm, providing a specific example of an algorithm and state what specific problem their algorithm solved, as well as explaining the relevance between coding and math. The motivation category asked students’ motivation to code, how confident they perceived themselves in coding, and their perceived usefulness of programming in the future. The last question elicited ideas for change and encouraged personal suggestions.

A stage-by-stage analysis approach (Burnard, 1991) was used to create coding themes for qualitative data analysis. In the initial coding stage, notes and memos were created to accompany the interviews. Themes started to become identified throughout the notes and memos. Open coding where actual categories started to form occurred. Final lists of categories were produced and to guard against researcher bias, and the category lists were shared to assist with determining three specific emerging themes. Interviews were again compared to the three finalized themes that were modified from the initial categories, including: (a) experience: overall experience in the computing activities, (b) learning: how well participants learned during the computing classes and (c) motivation: to what extent they were motivated by the computing activities (See Table 3).

Table 3 A Matrix displaying conceptual categories, interview questions, and excerpts

Trustworthiness

Patterns, themes, and categories emerged rather than being imposed to allow for inductive analysis (Patton, 2002). The researchers used triangulation of multiple data sources and multiple methods to increase trustworthiness, validity and credibility (Patton, 2002). In this study, we used data from pre- and post-assessments, semi-structured individual face-to-face interviews, and instructor in-class observations. The in-class observations were performed in a semi-structured manner where the instructor documented students’ progress and their perceptions through all the coding activities. The observation checklist contains notes in each day’s lesson, organized by activity, progress made, and challenges. Additionally, constant comparative analysis (Glasser, 1965) and a thick, rich description utilizing multiple forms of data within this study was provided with the intention of assisting readers to develop their own conclusions of the results (Lincoln & Guba, 1985).

Results

RQ1. To What Extent Did the Computing Activities Impact Students’ Knowledge Acquisition of Mathematical and Computational Concepts?

Table 4 shows the means and standard deviations of student scores on the knowledge retention test. Overall, students’ test scores have improved in all content areas according to the descriptive statistics. The post-test results had a statistically significant increase from the pre-test results, M= -58.61, 95% CI [-63.38, -53.84], t(50) = -24.687, p < .001. The effect size was measured using Cohen’s d = 4.057. This effect size is considered medium (Sawilowsky, 2009).

Table 4 Pre and Post Scores of Students’ Knowledge Retention

Table 5 includes the content areas where the results of the Wilcoxon Signed Ranked test were significant, showing a significant improvement in test scores among those categories. The remaining content area data were not appropriate for significance testing given a lack of symmetry in the differences.

Table 5 The results of wilcoxon signed ranked test

RQ2. To what extent did the Computing Activities Impact Students’ motivation?

Table 6 shows the means and standard deviations of student ratings on the motivation survey. Descriptive statistics reveals that students perceived motivation of learning in general and their interest in computer science more favorably after the experiment. According to the survey items that showed a significant difference, more students tended to believe computer science was fun, useful, and comprehensible even at their level being an elementary schooler.

Table 6 Pre and post scores of students’ motivation

RQ3. How did Young Learners Perceive the Computing Activities?

Overall experience in the computing activities. All but two students demonstrated a positive view toward their learning experience in the computing activities. They described their experience as “great,” “fun,” “interesting,” “exciting,” “awesome,” and “surprising.” When asked if they were excited to come to class each day, 80% (n = 37) of students stated that they enjoyed attending class. When asked to elaborate, four students added that they only wanted to not attend if they were in the middle of a sports game or fun outdoor activity.

When asked what they liked the most about the class, the vast majority of students (n = 44) stated that they enjoyed being able to code and create their own games. They also liked the characters in Scratch, the different activities such as the moving angry bird, creating their own “Siri-like” experiences, and coding in a text-based environment. A student who favored the text-based programming said that “I might like to be into programming. I’d like to make my own game.” Another student expressed, “I like the Phyton because I’d like to learn a little bit more. I like how you learn how to program.” When asked what they disliked about the class, all students stated that there is nothing that they did not like. A few (n = 4) expressed their desire to learn more. As one student said, “I just wanted it to be longer so we can learn more, even about designing a video game.” Two students even asked the class to be offered again in the future because they would like to attend again.

Learning in the computing activities. When asked how well they learned during the class, 13 students (28%) stated that they learned very easily, 39% (n = 18) expressed it was just right, and eight students (17%) stated that they learned with some difficulties. Learning was evident in this study as the majority of students preferred the actual typing process of the text-based programming languages—Python and Racket—over the block-based, drag-and-drop programming activities like Scratch. When asked if the drag-and-drop block coding or the typing of text-based coding was preferred, 33 students (72%) preferred the text-based coding even though it was considered the more difficult method. Five students (11%) favored the Scratch Lessons because they were able to “choose their own game characters.” The remaining students (n = 5) favored creating loops with Python. Overall, there were only two students (out of 46) who disliked using text-based programming.

When asked how they would describe an algorithm, twenty-five students (54%) successfully demonstrated a “real-world example” of an algorithm such as the steps to making a sandwich and 18 students (39%) gave a coding-process example, such as the Python code for creating a rectangle or the direction where a character should move. One student gave an example, “Algorithm is a code. Algorithm is a loop. Algorithm is like steps. It’s like the peanut butter and cereal things. You have to take cereals out. You have to pour the cereals into bowl. You have to put in spoon. You’re making it so you aren’t hungry.” Another student gave a different example, “An algorithm is when you make the character do what you want to do. When your character goes up, down, and side, and side. You make the character go around so that [the] thing doesn’t catch it.” Only two students were unable to answer the question. Although the question on algorithms was answered poorly in the post-test, most students were able to answer it correctly it in the interviews.

When asked about the connection between coding and math, all students stated that they were closely related. Thirty-two students (69%) were able to accurately state relationships including connections to: coordinate plane, coordinates, x and y values, variables, algebra, numbers, addition, subtraction, multiplication, division, and angles. For example, one student said, “I saw the X- and Y-axis. And, that’s math. My character was a robot. He was moving up, down, and right [using hand gestures to additionally articulate the connection with X- and Y-axis].” Another student stated, “I think coding [is] related to math because you have to solve problems.”

Observations occurred during each session with the instructor keeping tallies as documentation while students progressed through the coding activities. It was evident that verbal frustrations most frequently occurred during the following lessons: Python (variables, data types) and Python loops and debugging. Students expressed frustration as they were asked to type the code using the computer keyboard. Verbal celebrations such as, “Yes!” “I got it!” and positive cheering occurred more frequently during the following lessons: Scratch block-based coding and Racket (strings, shapes, and coordinate position).

Motivation. The vast majority of students (n = 37) appeared to be very motivated by what they learned in the computing class. When asked if students surprised themselves and ever thought they would be able to learn how to code in this way, 61% of students (n = 28) stated that they surprised themselves and they never thought they could code in this way. The remaining students stated that they always knew they could complete this task. Fourteen students commented on various tasks that they did not know they could do, such as the ability to be able to debug. One student commented, “I like to debug problem. I felt good [after being able to debug].” Another student commented, “Yeah, when we were doing the Python, I got one [bug.] […] I know I can do it because I had to learn it well.” There was also another comment: “Yup, I didn’t give up [debugging]. It’s like I was fighting the bad guy and won.”

When asked if students felt smarter now that they have learned how to write computer programs, 16 students (35%) stated “Yes.” When asked how the coding classes may help them in the future, 20 students stated that they could help them “make video games,” and “do more with computer science.” One student commented, “It helped me a lot because it’s like I want to make game.” Another student commented, “When I get older, I actually want to have experience to know how to actually make a game and probably teach how to make a game.” Other students (n = 8) noted that coding skills could help them “find a job” and “make money” because such skills would be needed in their future job market.

Discussion

As there has been rising hype about incorporating CT, computer science and coding surrounding the K-12 community with regard to both research and practice (State of Computer Science Education, 2021; Manches & Plowman 2017; Rich & Hodges, 2017; Rich et al., 2019; Shute et al., 2017; Vogel et al., 2017), we developed this study aiming to provide more empirical evidence showing the impact of computing activities primarily amongst younger-aged learners. The statistical findings provided insights into students’ learning achievement and conveyed significant increases in computer science and mathematical content retention, as well as motivation. The qualitative findings echoed the quantitative findings, presenting a variety of means through which students expressed a positive learning experience. These positive findings concur with previous studies where engagement, motivation and learning were seen amongst K-12 students involved in programing (Coşar & Özdemir, 2020; Gim, 2021; Hsu et al., 2018; Lambić et al., 2020; Meyer & Batzner, 2016; Lambert & Guiffre 2009; Saez-Lopez et al., 2016; Saritepeci 2020; Scherer et al., 2020).

Our study suggested evidence for the successful integration of CT and coding into math curriculum. The computing lessons and assessments were designed according to Common Core State Standards on math. By linking math content to hands-on, project-based coding activities, it enabled students to explore math content in a more meaningful and relevant way. Although in previous studies where students demonstrated difficulties in the comprehension of loops and algorithms (Belanger et al., 2018), our findings suggested that the learning potential of elementary school students should not be underestimated. With the visual stimuli and hands-on activities, the majority of students in the interviews were able to verbalize an abstract concept (i.e., algorithms) and some provided concrete examples. Their knowledge retention of math increased significantly, and they were able to perceive the relevance between math and coding that further deepened their understanding of said math concepts while helping them realize the value of math in problem solving. This finding reconfirmed the potential of CT integration to invigorate math instruction, as evidenced in prior literature (Hickmott et al., 2018; Niemelä & Helevirta, 2017; Rodríguez-Martínez et al., 2020; Weintrop et al., 2016; Wright et al., 2013).

It is equally worth noting that the coding activities were not only fun and enjoyable, but they were also challenging to the students. Although students expressed the most difficulties generating the text-based code instead of dragging and dropping block-based code, most admitted that they enjoyed the text-based code. This may contradict previous literature suggesting visual-based programming environments were more age-appropriate for young learners (Bers & Horn, 2010; Lambić et al., 2020; Mioduser et al., 2009; Noh & Lee, 2020; Rodríguez-Martínez et al., 2020; Strawhacker & Bers, 2019; Tran, 2019; Vasconcelos & Kim, 2020). As students in this study were presented with three programming environments, they experienced both block-based and text-based coding. This may have been a representation of students voluntarily seeking a greater challenge, which resulted in deeper learning and further accomplishments. Therefore, students were motivated to learn not because they were fun, but they were also engaged in an adequate amount of challenge prompting them to pursue even more.

Implications for practitioners

We offered the following suggestions for educators interested in incorporating computing activities into their existing curriculum. First, what differentiates these lessons utilized in this study with others is that it provided teachers with a manageable amount of materials they may feel confident in implementing. These lessons were intended to supplant bits and pieces of existing curricula instead of supplement full lessons, which often cause more work for the teacher. In order to provide additional scaffolding and lessen the workload of the classroom teachers who taught these lessons, in this study video tutorials were also made available to the students as supplemental materials. This suggestion can address some of the challenges that teachers have expressed regarding time limitation, workload, and inadequate resources (Rich et al., 2019; Tran, 2019).

When considering the integration of computing activities, we recommend teachers to attend to content alignment within their existing curriculum. While extant literature suggests that CT can be integrated in a wide variety of content areas (i.e., math, science, social studies, language arts) (Barr & Stephenson, 2011; Berland & Wilensky, 2015; Jenkins, 2015; Shute et al., 2017), it may be more feasible to begin the integration with a subject area where the relevancy is more easily perceived by both teachers and students, such as math. Our findings also suggested that computing activities may be applicable to a wide array of mathematical concepts that can carry over across multiple grade levels (Gim, 2021; Niemelä et al., 2017; Niemelä & Helevirta, 2017).

We also recommend that it might be worthy of introducing a variety of programming environments simultaneously, including purely text-based environments that may be preconceived as intimidating by teachers. As our findings suggested, the majority of participants in this study were open and excited about the opportunity to code in a text-based environment. Despite the challenges imposed by the programming script, working in the text-based programming environment made learners feel like actual programmers, which largely enhanced their motivation to learn and practice in such environment. As most programming courses are limited to one language, by utilizing a combination of Scratch, Python, and Racket Programming Languages, students will be exposed to multiple programming environments and syntax (Niemelä & Helevirta, 2017), which may help them to view computer science in a less daunting way. Additionally, Racket, in combination with the Wescheme Environment, offers a math-friendly experience for both students and teachers (Schanzer, 2015).

Limitations and Future Research Recommendations

Several limitations exist within this research. This research study utilized a pre- and post-design as splitting students into two groups was not an option at the time of the study. Having both control and experimental groups would have been more effective when determining the effect of this coding-integrated instruction. One threat to internal validity is that some of the changes among student motivation may have been due to the novelty effect (Leedy & Ormrod, 2016) involving their excitement towards a new educational technology and not necessarily the coding instruction. We are aware that while the pre-post test design sheds light on the impact of the CT instruction, it did not directly measure the impact of the instruction and therefore failed to speak to the magnitude of the outcome as well as whether the outcomes are due to the instruction or alternative factors. Other factors such as prior knowledge or experiences of computer knowledge may have an influence on the increase of mathematical and computational knowledge acquisition and motivation that were not accounted for in the study. The responses from the participants may be subject to social-desirability bias, especially since the instructor also undertook the researcher role conducting the interviews. Inter-rater reliability could have been calculated to improve the reliability of qualitative data analysis. The sample size was small, as only 51 students from a Boys and Girls Club participated in this study. Additionally, the duration of the study was relatively brief with only nine one-hour sessions; greater insights would have been gained if the course were longer.

Given these limitations, we recommend the following future research directions. First, future researchers could employ a true or quasi-experimental design to directly examine the impact of these computing activities. Additional variables, such as differences in grade-level, prior knowledge of coding as well as computer science concepts, and gender can be further factored in to determine how these variables may influence student learning and motivation. Future studies using a larger sample drawn from a traditional classroom setting will improve the generalizability of the study. Future researchers may also specifically delve into the differences of the three programming languages to provide further insights into the unique attributes of each. Additionally, to evaluate how may the coding instruction influence student learning of math, further research is needed to examine the relationship between students’ standardized exam results in math and the coding-infused instruction. Future research would be advantageous to further shed light on the role of computer programming in the directions specified.