Page 11 - Touchcode_C7_Flipbook
P. 11
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, click on the value a, and change the value to 10.
Step 4: Drag and drop ‘change a by 10’ block to ‘on start’ block.
Well done, you have learned to create and initialize a variable!
Coding uiz 01 Critical Thinking
State whether the following statements are true (T) or false (F).
a. Variable is a name given to a storage area.
b. A variable is declared but is not initialized ever has a null value.
DATA TYPES IN PROGRAMMING
Data type identifies the type of data which the declared variable can hold. It helps the
computer to understand what operations need to be performed on the declared variables.
To declare the variable, you need to define:
name of the variable its type
Variables in Real Life 9

