- :
-
Topics Covered
Repeat (Loop) Behavior
Lesson Links
...
Check Your Understanding:
1. What does the Loop do?
Send the program "flow" back to an earlier point in the program, causing it to repeat some instructions
Choose between two different possible sets of commands to run
Repeat a branching decision quickly, to enable continuous control of the robot
Run all the programs on the robot in a continuous cycle
2. How do you add a Loop to a program?
Click the Repeat Block, then drag a box around the commands you want to put inside the Loop
Select the blocks you want to put inside the Loop, then right-click and choose "Place in Loop"
Right-click in an empty area and choose "Make Loop" from the menu that appears
Drag a Repeat Block into the program, then drag commands into it