Page 182 - Trackpad_V5_Book 8
P. 182

TECHIPEDIA


                        (MICROSOFT MAKECODE ARCADE)






                               Hello Children,  today  we will  learn  about  blocks  that are
                               used to create projects in Microsoft Makecode.




            To create a program in which user enter a number. If the number entered is an even number, then the
            message displayed as: 'Even Number', and if the number entered is an odd number, then the message
            will display as 'Number is odd..! Try again'.

            Concept: Number is even if it gets divided by 2, otherwise the number is odd.
            To perform the task, follow these steps:

            Step  1    Visit the link: https://arcade.makecode.com/, Create a new project and name it 'Even/odd'.
            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 appears on workspace,
                      drop it to 'on start' block.

            Step  4   From the  'Logic', select  the  'if=else'  block,  it  will appear  on  the

                      workspace, drag the block and drop it to the 'on start' block.











            Step  5   From, the 'logic', select the 'comparison' block, it will appear on workspace, drag and
                      drop the block to 'if-else block'.














            180   Pro (Ver. 5.0)-VIII
   177   178   179   180   181   182   183   184   185   186   187