Page 66 - Touchcode_C7_Flipbook
P. 66

Experiential Learning
                                                       Coding Task            03



                                              To print the first element of the array
                   In this task, you will learn to print the first element of the array in MakeCode Arcade.

                   To perform the task, follow these steps:

                   Step 1:  Open MakeCode Arcade and create a new project ‘Array’.


                   Step 2:  Create a variable ‘arr’.

                   Step 3:  From ‘Array’ select ‘set text list’ block.




















                   Step 4:  Click on the drop-down arrow, and select ‘arr’.

                   Step 5:  Click on ‘+’ in ‘set arr’ block and type ‘c’, ‘d’.



















                   Step 6:  Move the ‘set arr’ block to ‘on start block’.

                   Step 7:  From ‘Text’, select ‘join’ block.

                   Step 8:  In first part of ‘join’ block, type ‘length of the array is:’ .

                   Step 9:  From ‘Array’, select ‘List get value at 0’ block.







                   64     Touchcode-VII
   61   62   63   64   65   66   67   68   69   70   71