Page 169 - Trackpad_V2.1_class8
P. 169
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 can 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 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’.
Techipedia (Microsoft MakeCode Arcade) 167

