The big ideaA loop does a step again and again, so a program can be short.
How it works
Sometimes Bo does the same step again and again.
Instead of saying the step every time, we say it once and say how many times.
Doing the same step again and again is called a loop. A loop makes a program short.
The long way and the short way.
Example 1: Hop up the stairs
Bo has five stairs to climb to his tree house.
Hop, hop, hop, hop, hop is a lot of saying.
The short way is hop, five times.
Example 2: Water the flowers
Four flowers in four pots all in a row.
Say pour once, and say four times.
All four flowers get a drink, and the list is much shorter.
Example 3: A loop on the board
The star is four squares away along the row.
One block says forward, four times.
Bo hops along, again and again.
Forward, four times.
Example 4: A loop and a turn
Bo faces up. Forward, two times, takes him to the top.
Turn right, then forward, three times.
Three blocks are all he needs.
Forward two times, turn right, forward three times.
Words to know
loop
Doing a step again and again.
again
One more time.
repeat
To do the same thing again and again.
short
Not long, with few words.
Watch out
Count the squares: the number of times must match, or Bo stops short or goes off the edge.
A loop repeats the same step. A different step needs its own block.
Going off the edge is a bug, a mix-up. Change the number and try again.
Try it
Which is shorter: pour, four times, or pour, pour, pour, pour?
Does a loop do a step just once?
How many pots get a drink with pour, four times?
Bo is at the left end of a row of five squares, with the star at the right end. How many times forward reaches it?
Answers: 1. pour, four times · 2. no · 3. four · 4. four
Try at homeLook for something that happens again and again, like a clock ticking, steps on a staircase, or clapping a rhythm. Ask a grown-up to help you spot a loop, and say it in one short sentence, like 'clap four times'.
For grown-upsLook for loops at home with your child: a clock ticking, the steps on a staircase, a clapped rhythm. Say each one in a short sentence, like clap, four times.
Open these notes on screenScan the code, or go to tutorpip.com.