Topics Covered
Did you know?
If/Else Statements vs. RepeatUntil LoopsIf conditional statements execute code immediately if the condition is met and skip to the next chuck of code if the condition is not met.
![]() |
If the condition in an if conditional statement is true, then the code within the curly braces directly below the if conditional statement is executed. Loops repeat commands until their condition is met. See the examples below. |
|
![]() |
If the condition of the if conditional statement is false the program skips to the next section of code. In this example it will skip “else” and to the code within the curly braces after the else. |
|
![]() |
When a repeatUntil's condition is false, the program will run the code within the if/else conditional statement until the condition is true. |
|
![]() |
When the repeatUntil conditional in the conditional loop is satisfied (the condition is true) the program jumps out of the loop to the next line in the program. |
Mini Challenge 1: Color Hunt
Program the robot to make the appropriate decisions based upon the color of the color tiles on the challenge board.
|
Mini Challenge 2: Recycle
In this challenge, the robot should start on one end of the challenge table. To begin, the robot moves forward.
|