Block Programming: Loops

bucle3

Hi! Today, we will continue the series of blog posts on block programming, specifically focused on loop blocks.

Throughout the article, we will learn the properties of loops and the advantages they bring to programming. To do so, we will use the “Loop Programming” activity in our educational platform Smile and Learn. 

The Smile and Learn educational platform has more than 7,500 STEM and literacy based educational activities for students between the ages of 3 and 12. In our platform, children can dynamically learn a plethora of content related to main educational subjects, whether in the classroom or at home. We also host content focused on social and emotional development along with family play activities! 

Our content is available in both English and Spanish! If you would like to try it, you can request a free 30 day demo without any obligations from Smile and Learn here. 

WHAT IS PROGRAMMING?

There’s often a misconception that computers are complicated machines that are difficult to comprehend. In reality, the backbone of computers—programming—is quite simple to understand.

Programming is the language of technology and machines. Machines and computers function through the instructions that we provide them by using programming languages. 

While the world continues to develop new forms of technology, the role of programmers becomes even more important. Whether it’s the establishment of digital currencies or the construction of spacecrafts, programming is at the forefront of shaping our world. Such exciting endeavors are suited for bright minds, and children should receive the opportunity to explore programming through friendly and engaging resources that encourage enthusiasm about technology.

To learn more, continue reading!

 

LOOP BLOCKS

In the blog post on block programming, we learned that every block contains a different command, condition, or event. This takes us to a new type of block: the loop. This block lets us repeat an action until it fulfills the condition which we set. While there are different types of loops, our activity uses the “loop for,” which allows us to repeat a sequence of movements a certain number of times.

 

LOOP ACTIVITY

To understand better, look at this example of what happens to the girl when we send a loop of a sequence of different movements to the programming zone. As you’ve seen, when we create a loop, we select how many times we want it to repeat. Then, we chose the movements within the loop. Useful, isn’t it? But we haven’t yet completed the programming objective. The girl has to mow the grass in the picture. Let’s take a closer look at how we’d do this. We can see that there are 5 grass squares in front of the girl. You may want to insert five forward movement blocks in the programming zone, but there’s only space for four blocks. Therefore, we need a loop that indicates that the girl must move forward a certain number of times. As shown below, the correct answer would be to move forward 5 times.

USEFULNESS FOR PROGRAMMING

Loop blocks allow us to use less blocks in the programming zone, and to avoid repetitive block sequences.  Using the least number of blocks when programming is crucial because we want to avoid errors. Furthermore, being efficient is a key to being a great programmer.

WHAT ELSE CAN I LEARN?

If you have enjoyed the “Loop Programming” activity, you can continue your learning with the following blog posts on block programming. Specifically, we will learn about conditional blocks. You’re going to love it! As a reminder, you can try our educational platform, Smile and Learn, by requesting a free 30 day trial without any obligations. You will then be able to explore all activities, games, and interactive stories we host. We look forward to meeting you!

 

Leave your comment