- :
Check Your Understanding:
  1. 1. How does an ‘IF’ statement differ from a while loop?
  2. An IF statement is always run once; a WHILE loop is run as long as the condition in the parentheses is true
    A WHILE loop is always run once; An if Statement is run as long as the condition in the parentheses is true
    An IF statement can only be run while the condition is false; the WHILE loop can only be run as long as the condition is false
    An IF statement is always longer than a WHILE statement
  3. 2. How is the robot able to determine it is veering?
  4. A touch sensor on the side of the robot is pressed when the robot runs into a side wall
    A light sensor on the front of the robot senses that it is traveling over a black line
    The left and right encoders are not the same value
    It can’t – the programmer has to tell it that it is veering
  5. 3. How can the robot self-correct its forward motion?
  6. Increase the power to the wheel with the most encoder counts
    Decrease the power to the wheel with the least encoder counts
    Assure that the power to both motors is the same
    Decrease the power to the wheels with the most encoder counts
  7. 4. An IF-ELSE statement allows the robot to run two different portions of code at the same time.
  8. Trues
    False
  9. 5. An IF-ELSE statement allows the robot to run one portion of code if the IF statement is false and another portion of code if it is true.
  10. Trues
    False
Boolean Logic Pt 1
Boolean Logic Pt 2