Page 68 - ThinkGPT_V2.1_C8_Flipbook
P. 68

Prepare the project  in MakeCode Arcade as shown below:



















                  When you run the project the output from initial stage to final stage are as follows:






















                                           Initial Stage                           Final Stage





                               You can also see JavaScript /Python code equivalent to given block code
                                                         in 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:















                      66     Premium Edition-VIII
   63   64   65   66   67   68   69   70   71   72   73