FBISE, NCP & NBF-aligned resources for Classes 9–12

/20

Computer Chapter 3 : Test # 4

1 / 20

A programmer wants to apply a style to several paragraphs across a webpage. The style may also be reused on other elements later. Which CSS selector method is the most appropriate choice?

2 / 20

A student is building a webpage for a school project. The page should respond when users click buttons, validate information entered in forms, and update content without reloading the entire page. Which technology is primarily responsible for adding these interactive features to the webpage?

3 / 20

While developing a webpage, a programmer wants to include instructions that the browser can execute to perform calculations and respond to user actions. The code must be embedded directly within the HTML document. Which tag is normally used for this purpose?

4 / 20

A student is testing a JavaScript program and temporarily wants to disable one line of code without deleting it. The disabled line should remain visible for future reference while being ignored during execution. Which notation should be used?

5 / 20

A school management system stores a student's name, fee amount, and admission status so that these values can be accessed later during program execution. Which JavaScript feature allows such information to be stored and reused?

6 / 20

A programmer is creating a counter that increases whenever a visitor clicks a button on a webpage. Since the value must change repeatedly during execution, which keyword is the most suitable for declaring the variable?

7 / 20

A student declares a value using the const keyword and later attempts to assign a completely new value to the same variable. During testing, the browser reports a problem. What is the most likely reason?

8 / 20

While debugging a webpage, a developer wants to display the current value of variables and messages in the browser's developer console without changing the visible webpage content. Which JavaScript command is commonly used for this purpose?

9 / 20

A teacher stores the marks of several students inside a single structure so that each mark can be accessed individually by its position. The solution should reduce the need for creating many separate variables. Which structure is being used?

10 / 20

A student creates an array containing five subject names. To retrieve the first subject from the collection, the programmer must specify the correct position number according to JavaScript indexing rules. Which index should be used?

11 / 20

An admission system checks whether a child's age is at least four years before granting admission. Depending on the result, different instructions are executed. Which programming concept is most suitable for implementing this decision-making process?

12 / 20

A programmer compares two values to determine whether they are exactly equal before displaying a success message. Which comparison operator should be used in the condition to perform this equality check?

13 / 20

A school's online result system displays "Pass" when a student's marks meet the required standard and "Fail" otherwise. The program must ensure that exactly one of the two messages appears. Which structure is most appropriate?

14 / 20

A programmer needs to print the same welcome message ten times on a webpage. Instead of writing the statement repeatedly, the developer wants a more efficient solution that reduces code duplication. Which feature should be used?

15 / 20

A developer creates a for loop that begins with an index value of 0 and continues while the index remains less than 10. Eventually, the loop stops executing. Which part of the loop controls this stopping point?

16 / 20

A mathematics teacher wants a program to display multiplication tables from 2 through 5. One loop controls the table number while another loop generates the multiples. Which programming technique best describes this arrangement?

17 / 20

A programmer writes a reusable block of code that calculates grades whenever it is needed throughout a large application. This approach improves organization and avoids repeating the same instructions multiple times. What feature is being used?

18 / 20

A function is designed to calculate a student's total marks. When defining the function, the programmer includes placeholders that will receive values when the function is called. What are these placeholders known as?

19 / 20

A developer has already defined a function that displays a greeting message. Later in the program, the function name is written followed by parentheses so that the instructions inside it can execute. What action is taking place?

20 / 20

A webpage changes its appearance immediately after a user clicks a button. The click is detected and a JavaScript program responds accordingly. In JavaScript terminology, what is this user action called?

Your score is

0%

9th class objective books