Studyfin Studyfin ✨ Sign up free

Loops

Grade 3 · Coding · Free lesson

Hi there! I am Studyfin, your friendly coding helper. Today we will learn how loops make coding fast and fun!

Sometimes we want to do the same task many times. In coding, we use a loop to repeat steps easily.

ai generated

Imagine a robot that needs to take three steps. Instead of writing 'step' three times, we use a loop block to repeat it.

Repeat 3 Times: [ Take Step ]

We can use loops to solve real problems. A loop saves time and keeps our code clean and short.

Looping Task!
✏️ Worked example

Let us design a program to water four flowers in a row. How can we use a loop to do this?

  1. First, we look at the problem. We have four flowers to water.
  2. Next, we find the action that repeats. The action is: water one flower and move to the next.
  3. Then, we count how many times to repeat. We have four flowers, so we repeat four times.
  4. Finally, we write the loop. We put 'Water and Move' inside a 'Repeat 4 Times' block.
motor loop
Want the full interactive lesson — quiz, animations, and Finn cheering them on?

More Coding lessons