Scenario 5 - Conditional Loops

Operational Goals

  • Understanding the construction of a conditional loop and the ability to apply it in code

Introduction to the Topic

The conditional loop block repeats the commands contained within it until a specific condition is met, e.g., Kodi is on a field with a cobweb.

Task

Command: Arrange the code from blocks, set the appropriate step values, and lead Kodi to the finish. Remember to apply the conditional loop block.

Course I, Conditional Loops - Level 0 - Conditional loop. Using a field on the board as a condition

Course I, Conditional Loops - Level 0 - Board solution

Task

Command: Arrange the code from blocks, set the appropriate step values, and lead Kodi to the finish. To activate the "Teleport" field and open passages, the Elves on the board must first press the appropriate buttons. Arrange a sequence containing code to be executed by each character. Also remember to apply conditional loop blocks and directional actions.

Course II, Conditional Loops - Level 11 - Exercise in conditional loop and control of three characters

Course II, Conditional Loops - Level 11 - Board solution