For
BlockPrograms often require repeating a set of actions. You have already used three ways and will learn a fourth in this lab session.
The for
block lets you simplify long scripts like:
for
block isn't installed automatically. Click on the File for
.
for
block counts by 1 from the first number to the last number, running the script inside it. As the for
block counts, it keeps track of the changing number with the variable i
to length
, click on the orange oval without dragging it. After you've changed the name, drag it where you want to use it.for
block in the squiral script. What is the result?