Page 74 - PortGPT_V2.1_C6_Flipbook
P. 74
Modulus AND %= Takes modulus of two b % = a (b% = 10) is
assignment operator operands and assigns the equivalent to b = b % a
result to the left operand (b = 30 % 10) (b=0)
Coding uiz 03
Subject Enrichment
Give one word answer to the following questions:
a. Add AND assignment operator is denoted by: .....................................
b. Divide AND assignment operator is denoted by: .....................................
ADDITION OPERATION USING BLOCK CODING
An addition arithmetic operation is used to add the values stored in two variables.
The addition of these variables is displayed as an output of the program. Let’s implement
addition operation in programming through a coding task.
Coding Task 01
To perform addition operation Experiential Learning
To perform the task, follow these steps:
Step 1: Visit the link: https://arcade.makecode.com/, and create a new project 'Addition
Operation'.
Step 2: The following screen appears:
Step 3: 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 4: Select the 'Change a by 1'. Block will appear on workspace, click on the value a,
and change the value of 'a' to 10.
72 Premium Edition-VI

