Page 65 - Dig_CodeAI_V2.1_Class_8
P. 65

Repeat n Times Loop

                 The repeat loop executes a block of code a specified number of times. It's useful when you know
                 exactly how many times you want to repeat an action.
                 Let us create a project in MakeCode Arcade that demonstrates the use of repeat block to display
                 numbers from 1 to 10. To do so, follow the given steps:


                                        1  Visit the https://arcade.makecode.com/ link
                                        to access the Microsoft MakeCode Arcade.















                          2  Click on the New
                         Project button.















                       3  Type  Repeat Loop as
                      the name of your project.


                                                                                           4  Click on the Create
                                                                                           button.


















                                                                                       6   Create  a  variable
                           5  Click on the Variables                                  with the name num.
                           blocks cateogry.



                                                                                Advanced MakeCode Arcade      63
   60   61   62   63   64   65   66   67   68   69   70