Page 85 - Touchcode_C8_Flipbook
P. 85

Coding in Minecraft







                                                  Calculating volume of cuboid

                  In this task, you will learn to calculate the volume of a cuboid in minecraft makecode.

                  To perform the task, follow these steps:

                  Step 1:  Visit the link: https://minecraft.makecode.com/, click on ‘New Project’                  .
                            On the next screen give the name of your project as ‘Calculating Volume of

                            Cuboid’, and click on ‘Create’.

                  Step 2:  Click on the variables, and select ‘Make a variable’ block.

                  Step 3:  Name the variable as ‘Volume’, and click on ‘OK’.

                  Step 4:  Click on ‘Advanced’, select ‘Functions’ and then click on ‘Make a Function…’

                  Step 5:  The following screen appears, name the function as ‘VolumeofCuboid’, add three
                            ‘Number’ parameter and name the parameters as ‘L’, ‘B’, ‘H’. Click on ‘Done’.





















                  Step 6:  Function ‘VoulmeofCuboid’ will appear on workspace as:






















                                                                                           Coding in Minecraft   83
   80   81   82   83   84   85   86   87   88   89   90