Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 106 - 2609_Logicode
P. 106

    PURE        You can also see JavaScript /Python code equivalent to given block code in
                           FACT        MakeCode Arcade.

                      FOR LOOP

                      The for loop is a counting loop, which is useful for situations where you need a counter variable
                      that can be used within the loop. It repeats a block of code a specific number of times, like the
                      repeat loop, but with more control over the iteration process.
                      Let us create a project in MakeCode Arcade that demonstrates the use of for block to display
                      number from 0 to 10. Prepare the project in MakeCode Arcade as shown below:

                      When you run the project, the following output displays the first iteration of the for loop.

                      Now, click on the A button in the Game Controls to view the further output till it reaches the last
                      iteration of the for loop.

                      104   Premium Edition-VIII

| 101 102 103 104 105 106 107 108 109 110 111 |