Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 102 - 2609_Logicode
P. 102

    DIFFERENT TYPES OF LOOPS
                      Loop runs a statement or group of statements multiple times. There are different types of loops.
                      Let us look at them.

                      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.

                      100   Premium Edition-VIII

| 97 98 99 100 101 102 103 104 105 106 107 |