Learning through Repetition

algorithmic thinking coding computer programming computer science content library jr critical thinking geometry learning logical reasoning predictive analysis problem solving programming programming language project-based learning scratch thinking Dec 01, 2023

There are countless programs that have been written and have yet to be written in programming, each with a different purpose. From app creations to simple animation, there are many different programming activities we can use with our students to ensure they have a diverse range of knowledge when it comes to coding. So, why might it be beneficial to teach the same program over again?

To answer this question, let’s take a look at the program above. This program is written for different sprites throughout our Content Library activities. In this particular program, the sprite is a colorful circle that is supposed to resemble confetti. The program makes it so that the confetti sprites start anywhere at the top of the screen and fall to the bottom.


In this program, there are numerous programming skills at work. First, there’s the concept of cloning. An exact copy of an application or object in a program is called a clone. In this program, to make it so that multiple pieces of confetti appear on the screen, the sprite needs to be cloned. Some students may choose to create multiple confetti sprites instead, but creating clones makes it so that we then only need to write code for the sprite once, instead of numerous times. The when I start as a clone instruction from the Control category allows us to write instructions for all of the duplicated confetti sprites without having to do so over and over again.

Understanding Loops

Before we can add instructions to the when I start as a clone handle, students need to understand how to clone sprites. This is where repetition becomes beneficial. To make it so that the confetti sprite is duplicated, we put the create clone of (myself) instruction within a forever loop. The forever instruction creates an infinite loop, so anything within this instruction will run continuously. The first time we teach this program, we may guide students to include the wait (1) second(s) instruction within the loop, as well. Students may recognize that they need an infinite loop in order to continuously clone sprites, but it is not always apparent that if we do not provide a wait instruction, the program will execute the code too quickly.

If a student repeats this program, each time it is written, there is the option to adjust the timing of the falling confetti. Additionally, there is the option to control how many times sprites are duplicated. Once students understand what it is the infinite loop does, they may choose to utilize a repeat loop, a while loop, or a for loop depending on the programming language they are using and the specific needs of their application. Each of these make it so that the code does not run continuously, but for a specific number of iterations. Sometimes this number is known (as is the case of a for loop or repeat (10) loop), sometimes it is not known (as is the case for a repeat until or while loop). As students work with this program repetitively, they can better understand both what it is the forever instruction does for the confetti sprites and how to make changes to customize to their goals for the program.

The XY-Coordinate Plane

This program also explores the xy-coordinate plane. In Scratch, the x-axis spans from -240 to 240, while the y-axis spans from -180 to 180. Students need to understand this concept so that they can program where the confetti sprites will start and where they will fall.

Let’s look at this instruction above. This makes it so that the confetti sprite starts anywhere - a random location - along the x-axis. The range spans from -240 to 240. Here, students need to understand that the negative number represent positions on the left hand side of the screen, whereas the positive represents the the right hand side. This means the confetti sprite clones can appear anywhere from the left to the right side of the Stage. 

The y-coordinate is set to 180. This is a positive value, which means that the confetti sprites will start at the top of the screen. As a result, each clone will start at the top but at some random position from side to side.

In this next instruction, the y-coordinate of the sprites is changed so that they fall down the screen. The negative numbers indicate that they will move downward. The number chosen by the pick random instruction controls how fast the sprite will fall.

In our Seasonal Creations unit of our Content Library Junior, there is a winter scene activity where the same code is utilized to make snow fall from the ground. It makes sense that snow would be programmed this way, as snow falls from the sky. But what if we want the confetti to pop up all over the screen, without specifying where it starts? This is where repetition comes in.

Benefits of Repetition

We’ve already discussed how each time students engage with this program, they learn how to manipulate and change loops to slightly change or customize the program. The same goes for changing the xy-coordinates. 

When we first start teaching a program like this, students may have a basic understanding of the coordinate plane, but may need to be guided to find the correct integers for the program. The more they work with the xy-cordinate plane and write the program, the more opportunities they have to manipulate and adjust the exact location of their sprites. 

So far, we’ve discussed the coordinate plane, cloning and loops. We haven’t discussed how students need to learn to use the Scratch editor to create multiple sprite costumes, or how we can use the switch costume to instruction to have the confetti sprites appear in different colors on the Stage. We somewhat discussed the pick random instruction, but not in depth. 

This goes to show the amount of detail present in one program. It is often said that toddlers benefit from watching the same show or movie over and over again due to the amount of detail.  Each time they view the movie again, a new detail is uncovered.  Similarly, each time a program that encompasses multiple programming concepts is written, it is likely students will better understand the uses of each instruction within the program and how changing these instructions will affect what the program presents on the screen.

The article referenced above also mentions how children can predict what is going to happen when they’ve seen a show or movie, or read a book multiple times. This develops logical thinking and the understanding of cause and effect relationships.

In programming, cause and effect relationships are constantly at work. Programmers literally use cause/effect instructions when they use conditionals - the if/then statements of programming. Understanding how one instruction affects another and being able to predict what the program will do based on the instructions used is a skill that students can build over time when they repeat programs.

Why This Matters

As educators, we often feel the need to come up with new, creative projects to keep our students engaged. We feel pressure to constantly have innovative ideas and present our students with challenges no one has considered using in their curriculum before.

But maybe thinking outside the box involves looking no further than the resources we already have. Sometimes, it’s beneficial to repeat the same activities in new contexts, especially when it comes to programming activities.  We can repurpose them, change the challenge slightly, and encourage our students to find ways to adjust the program based on the subtle changes we suggest.  In the end, in doing so we are providing our students with the exposure they need to truly grasp the concepts we aim to teach.  Our students are given the opportunity to strengthen the critical thinking skills they will need to apply to any problem-based challenge, coding and beyond.

Stay connected with news and updates!

Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.

We hate SPAM. We will never sell your information, for any reason.

To learn more about how we can help you integrate STEM education at your campus or homeschool, contact us for a consultation. 

Schedule a Consultation