Form 8: Combining Loops and Conditionals Exercise

Form 8: Combining Loops and Conditionals

10 minutes 4 views 0 saves EN
Send as Assignment
Form 8: Combining Loops and Conditionals

Practice combining loops and conditional statements to create more complex and dynamic logical structures.

Questions

  1. MultiChoice

    What does combining loops and conditionals allow an algorithm to do?

  2. MultiChoice

    'REPEAT 10 TIMES: [IF sensor detects obstacle THEN turn left ELSE move forward]'. What happens each step?

  3. WordsBox

    Combining loops and conditionals enables ____ decision-making during ____

  4. MultiChoice

    In a loop checking 10 numbers: 'IF number is even THEN count = count + 1'. What is counted?

  5. MultiChoice

    'REPEAT UNTIL energy == 0: [Move forward; IF battery low THEN charge]'. What does robot do if battery low?

  6. MultiChoice

    Which structure checks every item in a list and picks items meeting a criteria?

  7. WordsBox

    Inside a ____ an IF statement can test different ____ on each iteration.

  8. MultiChoice

    'REPEAT 5 TIMES: [IF coin == heads THEN win = win + 1]'. How many coins are flipped?

  9. MultiChoice

    Why put an IF statement inside a loop?

  10. MultiChoice

    'REPEAT 8 TIMES: [IF step is muddy THEN jump ELSE walk]'. What happens on a dry step?

  11. MultiChoice

    What is nested code logic?

  12. MultiChoice

    In a grid game, repeating 'IF space empty THEN move forward' allows character to: