Answer Key: EV3 - Loops Unit Level

Answer Key: Unit Quiz

  1. When the program beam reaches the Loop block end, it either loops forever or checks the Condition set by the block parameters ( time, sensor, logic).  If the Condition is not met (or the Loop is set for “forever”) the program returns to the beginning of the Loop and runs the contents of the Loop again.  If the Condition is met, the program exits the Loop and runs the next block in the program.
  2. The Loop block only checks its Condition at the moment when the program reaches the Loop block end.  If there are blocks inside the Loop that take significant amounts of time (“Wait-for” or “Move” blocks set for large durations) then the loop Condition may not be checked very often.  If there are only quick blocks inside the Loop (“Move” blocks set for unlimited or stop) then the Loop Condition will be checked frequently (up to hundreds of times per second).
  3. 1) The forward Move blocks need to be changed from unlimited duration to a fixed duration (and the two durations would need to be different since this is a rectangle, not a square)
    2) The two turning Move blocks need to turn in the same direction
    3) The Loop block count should be set at 2, since Ziffle wants one lap of a rectangle (and the Move blocks inside the Loop create an “L” shape).
  4. Ziffle’s tribot will only stop for an obstacle that is 10 cm away after the “right turn”, since this is the only point in the program when the Loop block checks for an obstacle.  If the obstacle is placed in front of the tribot anywhere else in the zig-zag maneuver, it will be ignored and the tribot will not stop.