Jump three times

Try itDoing it again

This slime jumps three times, then tells you it is done.

repeat times
end

Press Play

Press Play Play this script, under the little game. Count the jumps: one, two, three. Then the slime says "Done!"

How it works

LineWhat it does
repeat 3 timesGo round the loop 3 times.
jump and wait 1 secondThe steps inside. Done each time round.
endThe loop stops here.
say "Done!"Not inside the loop. It happens once, after the loop has finished.

Change the number

  1. Press Stop Stop.
  2. Look at the top left of the code box. Press Blocks Blocks.
  3. Find the repeat block. Beside its number are - and +.
  4. Press + two times, so it says 5.
  5. Press Play Play this script. Count five jumps.

You changed one number, and the slime did two more jumps. That is what a loop is for.

This section ticks itself when you press Play.

Press Play in the code box to finish this section.