Page 58 - Computer_Genius_v2.1_C7_flipbook
P. 58

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.



                       56    Computer Genius (V2.1)-VII
   53   54   55   56   57   58   59   60   61   62   63