Scenario 3 - Iterative Loops

Operational Goals

  • Ability to simplify algorithm notation by using iterative loops

Introduction to the Topic

The iterative loop block repeats any number of times the commands that are in it, e.g., a step up and a step right. An iterative loop (sometimes called a counter loop) is a programming technique that allows for multiple execution of the same instructions, without the need to list them all in sequence. This approach is particularly useful where repeated code fragments occur next to each other within the full sequence of code.

Task

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

Course I, Iterative Loops - Level 0 - Iterative Loop Construction

Course I, Iterative Loops - Level 0 - Board solution

Task

Command: Arrange the code from blocks, set the appropriate step values, and lead Kodi to the finish. Along the way, collect all the gold coins and pickaxes, which you will use to break the rocks blocking the way. Remember to use the counter loop blocks and directional actions.

Course II, Iterative Loops - Level 0 - Iterative Loop Repetition

Course II, Iterative Loops - Level 0 - Board solution