Page 81 - PortGPT_V2.1_C6_Flipbook
P. 81
5. Which of the following is a valid variable name?
a. @orange b. 1orange
c. orange1 d. orange *1
B. State whether the following statements are true (T) or false (F).
1. '/' operator divides the first operand by the second.
2. '++' operator increases the integer value by 1.
3. An arithmetic operator is used to assign a new value to a variable.
4. Variable defined outside the scope cannot be accessed.
5. Data type identifies the type of data which the declared variable can hold.
C. Fill in the blanks.
HELP BOX unique, numeric, right, integer, packet
1. Variables are the ........................... that hold information.
2. To identify the variables uniquely, you needs to allocate them a ........................... name.
3. ........................... data type store whole numbers/Integer value.
4. Arithmetic operation combines two or more ........................... expressions.
5. Simple assignment operator assigns values from ........................... side to left side operand.
D. Match the following:
1. Modulus a. ++
2. Increment b. –=
3. Add AND assignment operator c. *-
4. Subtract AND assignment operator d. +=
5. Multiply AND assignment operator e. %
E. Answer the following questions:
1. What is the use of Subtract AND assignment operator?
..............................................................................................................................................................
..............................................................................................................................................................
2. Write the rules to name a variable.
..............................................................................................................................................................
..............................................................................................................................................................
Variables Using Block Coding 79

