Page 33 - Touchcode_C6_Flipbook
P. 33
Typecasting refers to convert the variable data type into another data type.
Example 2: b=8 Subject Enrichment
C= 'Hello'
y = int(6) //y will be saved as 6
Program Start
Declare variables
DECLARE Integer b
DECLARE String C
DECLARE Integer y
Assign values
Assign b = 8
Assign C = "Hello"
Assign y = 6
Output:
OUTPUT "b = ", b
OUTPUT "C = ", C
OUTPUT "y = ", y
END FUNCTION
PROGRAM END
Coding fact
NASA is the most popular space research agency. Some of its spacecraft still use
software from the 1970s due to reliability, but it also develops modern software
for new missions.
Coding uiz 02
Subject Enrichment
Fill in the blanks.
a. ............... identifies the type of data which the declared variable can hold.
b. ............... is used to store whole numbers.
Variables Using Block Coding 31

