Page 61 - Computer Genius Class 07
P. 61

To perform the task, follow these steps:
                 Step 1    Visit  the  link:  https://arcade.makecode.com/.  Create  a

                          project ‘Number is Even or Odd, and click on ‘Create’.
                 Step 2   Create a variables ‘number’.

                 Step 3    Select ‘set number to 0’ block and drop it to the ‘on start’ block.












                 Step 4    From ‘Logic’ select ‘if-else’ block and drop it to the ‘on start’

                          block below the ‘set number to 0 ‘ block.
                 Step 5    From ‘Logic’ select the ‘comparison’ block and drop it to the

                          ‘true’ of ‘if-else’ block.
                 Step 6    From ‘Math’ select the ‘remainder of’ block and drop it to the
                          first ‘0’ of ‘comparison’ block.

                 Step 7    In first ‘0’ of ‘remainder’ block, drag and drop the variable
                          ‘number’ and in the second ‘0’ of remainder block change the
                          number from ‘0’ to ‘2’.

















                 Step 8    From ‘Game’ select the ‘splash’ block, drop the block to ‘if’ of ‘if-else’ block and add the
                          text, ‘Number is Even’.

                 Step 9    From ‘Game’ select the ‘splash’ block, drop the block to ‘else’ of ‘if-else’ block and add the
                          text, ‘Number is Odd’.

                 Step 10   Change the value of number to 6 in ‘set number to 0’ block. Click on ‘Start the simulator’ to
                          view the output.

                 Step 11    Change the value of number to 5 in ‘set number to 0’ block. Click on ‘Start the simulator’ to
                          view the output.






                                                                                Advanced MakeCode Arcade      59
   56   57   58   59   60   61   62   63   64   65   66