Beruflich Dokumente
Kultur Dokumente
/* Before anything else, write your name, strand, subject and name of your instructor in your booklet. Dili magpa-labad sa ulo,
please. Arigathanks! */
I – Multiple Choice: Write the correct answer in your test booklet. (15 points)
2. It is a type of linear array. Accessing its elements involves a single subscript which can either represent a
row or column index.
a. Nested Loop c. One-dimensional array
b. Do-while loop d. Public class
3. It is a loop within a loop, an inner loop within the body of an outer one.
a. For loop c. Nested loop
b. While loop d. Hula-hoop
4. It is an array containing one or more arrays, or what we call, an array inside an array.
a. Multidimensional array c. Multidimensional class
b. Multidimensional portal d. Multidimensional scanner
10. It is the process of designing and building an executable computer program for accomplishing a specific
computing task.
a. Computer Programming c. Computer Engineering
b. Computer System d. Computer Troubleshooting
11. This executes a block of code if a specified condition is true. If the condition is false, another block of
code can be executed.
a. If-else statement c. For loop
b. Switch-case statement d. Nested loop
12. This statement tests the value of a variable and compares it with multiple cases. Once the case match is
found, a block of statements associated with that particular case is executed.
a. If-else statement c. Switch-case statement
b. Nested loop d. Break-default statement
14. It is a programming language conditional iterative statement which is used to check for certain conditions
and then repeatedly execute a block of code as long as those conditions are met.
a. Do-while loop c. For loop
b. Nested loop d. While loop
15. It is a control flow statement that executes a block of code at least once, and then repeatedly executes the
block, or not, depending on a given boolean condition at the end of the block.
a. For loop c. While loop
b. Nested loop d. Do-while loop
II – Find the error: In this program code, write the error and the correct answer in your test booklet. (30 points,
2 points each)
import java.util.Scnnr;
if (operation = "+");
{
System.out.println("your answer is" + (num1 + num2);
}
else if (operation == ‘-‘);
{
System.out.println("your answer is" + (num1 - num2));
}
if (op == "/");
{
System.println("your answer is" + (num1 / num2));
}
else if (operation == "divide")
{
System.out.print("your answer is" (num1 * num2));
};
)
}
III – Written Code: Write a code that can output the following: (55 points)
Set A:
*
**
***
****
*****
Set B:
“Kung kamung duha naay FUNCTION, then it has a PARAMETER to provide then check if it is MATCH for equation for LOVE it is
possible to RETURN love or else RETURN 0 najud.”