Page 47 - Touchcode_C7_Flipbook
P. 47

Experiential Learning
                                                      Coding Task          04


                                                  To display a cube of numbers

                  Concept: Cube is when a number is multiplied three times by itself. For example cube of
                  3 is 27, (3x3x3=27).

                  To perform the task, follow these steps:

                  Step 1:  Visit the link: https://arcade.makecode.com/. Click on ‘New Project’, Write the
                            name of your project ‘Cube’, and then click on ‘Create’.

                  Step 2:   Click on ‘Variables’, select ‘Make a variable...’, write the
                            name of the variable as ‘a’, then click on ‘OK’. Variable ‘a’

                            will appear in ‘Make a Variable…’.
                  Step 3:  Select the  ‘Change  a by  1’  block,  it  will  appear on

                            workspace, drop it to ‘on start’ block.












                  Step 4:   Click on ‘Variables’, select ‘Make a variable...’, write the
                            name of the variable as ‘Cube’, then click on ‘Ok’. Variable
                            ‘Cube’ will appear in ‘Make a Variable…’.

                  Step 5:   From the ‘Variables’ select ‘set cube to 0’ block, it will
                            appear on the workspace. Drag ‘set cube to 0’, and drop

                            it to the ‘on start’ block below ‘set a to 0’ block.













                  Step 6:   From the ‘Math’  block, select ‘multiplication’
                            block two times. Arrange the blocks as shown:






                                                                                           Fun with Functions    45
   42   43   44   45   46   47   48   49   50   51   52