Course of Raku / Essentials

Loops

Loops are a mechanism to repeat the same action a number of times. In this section, we’ll have an overview of some of the Raku’s constructs that help to organise loops. There will more in the second part of the course, so stay tuned.

For now, let us consider the following items.

Exercises

This section contains 7 exercises. Examine all the topics of this section before going to the coding practice.

  1. Squares and cubes in a loop
  2. Factorial
  3. Fibonacci numbers
  4. Echo until enough
  5. Division via subtraction
  6. FizzBuzz in a loop
  7. Digital stairs

Course navigation

Conditional checks / Ternary operator   |   Using while