AKU-EBClass X (SSC Part II)CHAPTER-WISE CRQS • SHORT RESPONSE

Computer Science — Chapter-Wise Constructed Response Questions (CRQs)

Master 2–3 mark short-answer conceptual questions from 2024 & 2025 Annual Examination Paper II, Model Paper II, and the 2025 syllabus, complete with Checking Hints rubrics, model solutions, and authentic E-Marking candidate scripts.

Back to Computer Science Subject Hub

Select a Chapter (or Browse All Below)

Click any unit card to filter to that specific chapter, or use the search bar to find any concept, formula, or SLO code.

UNIT 8 • 7 SHORT QUESTIONS (CRQS)

Unit 8: Number Systems and Encoding Schemes

2025 Syllabus Outcome (8.2.1): apply the binary number system to solve arithmetic problems involving addition, subtraction, multiplication, and division;
Solve the following using the binary number system.
i. 10101102+1101012=?1010110_2 + 110101_2 = ? (1 Mark)
ii. 11100112−10110112=?1110011_2 - 1011011_2 = ? (1 Mark)
iii. 1011012×1012=?101101_2 \times 101_2 = ? (1 Mark)
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for correct binary addition in part i (10001011210001011_2).
  • 1 mark for correct binary subtraction in part ii (001100020011000_2 or 11000211000_2).
  • 1 mark for correct binary multiplication in part iii (11100001211100001_2).
✓ MODEL SOLUTION (Full Marks Guidance)
i. Binary Addition (10101102+11010121010110_2 + 110101_2)
Architecture / Topology Diagram
  Carry:   1 1 1 1 0 0 0
           1 0 1 0 1 1 0_2   (86_10)
         + 0 1 1 0 1 0 1_2   (53_10)
         -----------------
         1 0 0 0 1 0 1 1_2   (139_10)
•Answer: **10001011210001011_2**
ii. Binary Subtraction (11100112−101101121110011_2 - 1011011_2)
Architecture / Topology Diagram
           1 1 1 0 0 1 1_2   (115_10)
         - 1 0 1 1 0 1 1_2   ( 91_10)
         -----------------
           0 0 1 1 0 0 0_2   ( 24_10)
•Answer: **001100020011000_2 (or 11000211000_2**)
iii. Binary Multiplication (1011012×1012101101_2 \times 101_2)
Architecture / Topology Diagram
               1 0 1 1 0 1_2   (45_10)
             x       1 0 1_2   ( 5_10)
             ---------------
               1 0 1 1 0 1
             0 0 0 0 0 0 x
         + 1 0 1 1 0 1 x x
         -------------------
           1 1 1 0 0 0 0 1_2   (225_10)
•Answer: **11100001211100001_2**

Examiner Commentary (Better Responses): Follow the reference model solution and step-by-step marking criteria.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Avoid syntax errors, missing loop termination conditions, or incomplete binary arithmetic carries.
Examiner Suggestion for Improvement: Practise writing complete JavaScript programs and binary arithmetic conversions step by step.
Q.42025 Annual Paper II ↗Out of 2025 Syllabus
Total 5 Marks • Level A
2025 Syllabus Outcome (): Logic Gates & Truth Tables (Retired 2022 Syllabus Unit 12)
Consider the following logic circuit.
i.Write the logic expression to represent the given logic circuit. (1 Mark)
ii.Fill the given truth table for this problem. (4 Marks)
ABCX
000
001
010
011
100
101
110
111
Diagram for Q.4
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • i. 1 mark for correctly writing a logical expression (X = AB + C').
  • ii. 4 marks for correctly filling the truth table (1 mark will be given to fill two possible outputs).
  • Note: round off marks to the nearest whole number.
✓ MODEL SOLUTION (Full Marks Guidance)
i. Boolean Logic Expression (1 Mark):
X=(A⋅B)+C‾X = (A \cdot B) + \overline{C}
ii. Completed Truth Table (4 Marks):
ABCA⋅BA \cdot BC‾\overline{C}X=AB+C‾X = AB + \overline{C}
000011
001000
010011
011000
100011
101000
110111
111101

Examiner Commentary (Better Responses): In better responses, candidates accurately wrote the correct logical expression (X = AB + C'). They correctly identified the logic gates and combined the variables with logic gate symbols given in the circuit diagram. Also, they correctly applied the method that solved the truth table and determined the correct output of the truth table across all eight possible input combinations.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.4
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, it was observed that some candidates struggled to provide the correct logical expression and were unable to accurately complete the truth table for the given circuit. For example, they wrongly identified or put the wrong symbol of the logic gate(s) that led to the incorrect logical expression. While a few candidates managed to write the correct expression, they failed to fill in the truth table correctly.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.4
Examiner Suggestion for Improvement: To improve performance on such questions, candidates require more extensive practice in circuit design and constructing corresponding truth tables. Teachers are encouraged to regularly provide candidates with various logic circuits and guide them in deriving the correct logical expressions as well as completing accurate truth tables.
Q.42024 Annual Paper II ↗Out of 2025 Syllabus
Total 5 Marks • Level A
2025 Syllabus Outcome (): Logic Gates & Truth Tables (Retired 2022 Syllabus Unit 12)
In the given diagram, two switches (A and B) send values to a logic circuit giving X as the output.
X has a value of 1 with the following conditions:
Architecture / Topology Diagram
Switch A sends value 1 OR switch B sends value 0
                      AND
Switch A sends value 0 OR switch B sends value 0
                      AND
Switch A sends value 1 OR switch B sends value 1
i. Draw the logic circuit to represent the given conditions. (3 Marks)
ii. Complete the truth table for the logic circuit drawn in part i. (2 Marks)
ABWorking SpaceX
00
01
10
11
Diagram for Q.4
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • Part i (3 Marks): 1 mark for NOT gates on A and B (A‾,B‾\overline{A}, \overline{B}); 1 mark for the three OR gates representing (A+B‾)(A + \overline{B}), (A‾+B‾)(\overline{A} + \overline{B}), and (A+B)(A + B) (or equivalent Sum-of-Products gates); 1 mark for combining them with an AND gate to output XX.
  • Part ii (2 Marks): 0.5 mark for each correct row of the 4-row truth table (including intermediate working columns).
✓ MODEL SOLUTION (Full Marks Guidance)
i. Boolean Expression & Logic Circuit Architecture (3 Marks)
•Condition 1: Switch A = 1 OR Switch B = 0 →(A+B‾)\rightarrow (A + \overline{B})
•Condition 2: Switch A = 0 OR Switch B = 0 →(A‾+B‾)\rightarrow (\overline{A} + \overline{B})
•Condition 3: Switch A = 1 OR Switch B = 1 →(A+B)\rightarrow (A + B)
•Combined Product-of-Sums (POS) Expression:
X=(A+B‾)⋅(A‾+B‾)⋅(A+B)X = (A + \overline{B}) \cdot (\overline{A} + \overline{B}) \cdot (A + B)
*(Note: If interpreted as the three input combinations (A,B)∈{(1,0),(0,0),(1,1)}(A,B) \in \{(1,0), (0,0), (1,1)\} that make X=1X=1, the Sum-of-Products expression is X=AB‾+A‾B‾+AB=A+B‾X = A\overline{B} + \overline{A}\overline{B} + AB = A + \overline{B}.)*
ii. Completed Truth Table (2 Marks)
**Method A — Literal Clause-by-Clause Evaluation X=(A+B‾)⋅(A‾+B‾)⋅(A+B)X = (A + \overline{B}) \cdot (\overline{A} + \overline{B}) \cdot (A + B):**
ABA‾\overline{A}B‾\overline{B}C1=A+B‾C_1 = A + \overline{B}C2=A‾+B‾C_2 = \overline{A} + \overline{B}C3=A+BC_3 = A + BX=C1⋅C2⋅C3X = C_1 \cdot C_2 \cdot C_3
00111100
01100110
10011111
11001010
**Method B — Minterm Interpretation (X=1X = 1 for (A,B)=(1,0),(0,0),(1,1)(A,B) = (1,0), (0,0), (1,1), i.e., X=AB‾+A‾B‾+ABX = A\overline{B} + \overline{A}\overline{B} + AB):**
ABA‾B‾\overline{A}\overline{B}AB‾A\overline{B}ABABX=A‾B‾+AB‾+ABX = \overline{A}\overline{B} + A\overline{B} + AB
001001
010000
100101
110011

Examiner Commentary (Better Responses): In better responses, candidates represented 'sends value 0' using NOT gates, connected the three two-input gates into a final combining gate, and showed complete intermediate columns in the Working Space of the truth table.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, candidates ignored the 'sends value 0' inversions (treating them as direct inputs A and B without NOT gates) or filled column X without showing intermediate steps in the Working Space.
Examiner Suggestion for Improvement: Remind students that 'Switch sends value 0' corresponds to the complemented variable (NOT gate) in Boolean logic circuits, and always use the Working Space column to evaluate each parenthesised sub-expression step by step.
Q.42023 Annual Paper II ↗Out of 2025 Syllabus
Total 5 Marks • Level A
2025 Syllabus Outcome (): Logic Gates & Truth Tables (Retired 2022 Syllabus Unit 12)
Two switches, L and M, send values of 0 and 1 to a logic circuit respectively. Value X is the output of the logic circuit.
Output X has a value of 1 with the following conditions:
Architecture / Topology Diagram
Switch L sends value 1 AND switch M sends value 0
                      OR
Switch L sends value 0 AND switch M sends value 0
                      OR
Switch L sends value 1 AND switch M sends value 1
i. Draw the logic circuit to represent the given conditions.
ii. Complete the truth table for the logic circuit drawn in part i.
(Note: Show your working in the given working space. Without working NO mark will be awarded.)
LMWorking SpaceX
00
01
10
11
Diagram for Q.4
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • i. 1 mark for correctly placing NOT gates; 1 mark for correctly placing OR gates; 1 mark for correctly placing any AND gates.
  • ii. 1 mark for writing either both pairs of working space and value of X for TWO or attempting either working space or value of X for any TWO values; 1 mark will be awarded if only the values of X are written or only the working is shown.
✓ MODEL SOLUTION (Full Marks Guidance)
i. Boolean Expression & Logic Circuit (3 Marks)
•Condition 1: Switch L = 1 AND Switch M = 0 →L⋅M‾\rightarrow L \cdot \overline{M}
•Condition 2: Switch L = 0 AND Switch M = 0 →L‾⋅M‾\rightarrow \overline{L} \cdot \overline{M}
•Condition 3: Switch L = 1 AND Switch M = 1 →L⋅M\rightarrow L \cdot M
•Combined Sum-of-Products Expression:
X=(L⋅M‾)+(L‾⋅M‾)+(L⋅M)X = (L \cdot \overline{M}) + (\overline{L} \cdot \overline{M}) + (L \cdot M)
ii. Completed Truth Table (2 Marks)
LML‾\overline{L}M‾\overline{M}LM‾L\overline{M}L‾M‾\overline{L}\overline{M}LMLMX=LM‾+L‾M‾+LMX = L\overline{M} + \overline{L}\overline{M} + LM
00110101
01100000
10011001
11000011

Examiner Commentary (Better Responses): In better responses, the candidates accurately depicted the symbols of gates, ensuring their correct representation. Moreover, the candidates effectively demonstrated the working of the truth table, providing step-by-step calculations to arrive at the correct output (X = 1, 0, 1, 1).

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.4
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses demonstrated various shortcomings. Many candidates used incorrect symbols in the circuit diagram, leading to inaccurate representation. Additionally, the truth table lacked to show working or calculations, which resulted in an incorrect output.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.4
Examiner Suggestion for Improvement: Teachers are recommended to familiarise candidates with the practical demonstration of the logic circuits using simulation tools such as Multisim.
Q.62019 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): Boolean Algebra Truth Tables (Moved to Class IX Unit 2 SLO 2.3.4 in 2025 Syllabus)
Complete the truth table for the given Boolean expression.
X=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
ABCA‾\overline{A}B⋅CB \cdot CX=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
000
001
010
011
100
101
110
111
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for correct column NOT A.
  • 1 mark for correct column B . C.
  • 1 mark for correct final column X = NOT A + (B . C).
✓ MODEL SOLUTION (Full Marks Guidance)
ABCA‾\overline{A}B⋅CB \cdot CX=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
000101
001101
010101
011111
100000
101000
110000
111011

Examiner Commentary (Better Responses): Better responses showed good understanding of various Boolean operations and evaluated the Boolean expressions in the table correctly.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.6
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses managed to find the complement of A. However, they were not able to evaluate expressions containing AND/OR Boolean operations.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.6
Examiner Suggestion for Improvement: Note: Boolean algebra and logic gate truth tables moved to Class IX (Unit 2 SLO `2.3.4`) in the 2025 syllabus.
Q.62018 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): Boolean Algebra Truth Tables (Moved to Class IX Unit 2 SLO 2.3.4 in 2025 Syllabus)
Complete the truth table for the given Boolean expressions.
ABCA+BA + BA+B‾\overline{A + B}X=(A+B‾)⋅CX = (\overline{A + B}) \cdot C
000
001
010
011
100
101
110
111
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for column A + B.
  • 1 mark for column NOT(A + B).
  • 1 mark for column X = NOT(A + B) . C.
✓ MODEL SOLUTION (Full Marks Guidance)
ABCA+BA + BA+B‾\overline{A + B}X=(A+B‾)⋅CX = (\overline{A + B}) \cdot C
000010
001011
010100
011100
100100
101100
110100
111100

Examiner Commentary (Better Responses): Better responses demonstrated a very good understanding of the Boolean operations (complement, AND, OR), applied these operations on given variables and completed the table correctly.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.6
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses were mostly able to calculate the complement of A+B. However, these responses did not perform the AND/OR operations correctly.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.6
Examiner Suggestion for Improvement: Note: Boolean algebra and logic gate truth tables moved to Class IX (Unit 2 SLO `2.3.4`) in the 2025 syllabus.
Q.62017 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): Boolean Algebra Truth Tables (Moved to Class IX Unit 2 SLO 2.3.4 in 2025 Syllabus)
Complete the truth table for the given Boolean expression.
X=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
ABCA‾\overline{A}B⋅CB \cdot CX=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
000
001
010
011
100
101
110
111
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for column NOT A.
  • 1 mark for column B . C.
  • 1 mark for column X = NOT A + (B . C).
✓ MODEL SOLUTION (Full Marks Guidance)
ABCA‾\overline{A}B⋅CB \cdot CX=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
000101
001101
010101
011111
100000
101000
110000
111011

Examiner Commentary (Better Responses): Better responses demonstrated very good understanding of the Boolean operations (complement, AND, OR), performed them and completed the table correctly.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.6
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses were mostly able to calculate the complement of A but such responses could not perform the AND/OR operations.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.6
Examiner Suggestion for Improvement: Note: Boolean algebra and logic gate truth tables moved to Class IX (Unit 2 SLO `2.3.4`) in the 2025 syllabus.
UNIT 9 • 7 SHORT QUESTIONS (CRQS)

Unit 9: Computational Thinking and Algorithm

2025 Syllabus Outcome (9.1.1): write algorithms to address the following types of problems: a. conditional algorithm (I. if, II. nested if, III. if else, IV. else if, V. switch), b. iteration algorithm (I. for, II. while, III. do-while, IV. nested loops), c. searching algorithm (I. linear, II. binary), d. sorting algorithm (I. selection, II. bubble);
Write an algorithm using a for loop to print the first 10 natural numbers.
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for Start/Stop steps and loop initialisation (i = 1 to 10).
  • 1 mark for printing/outputting i inside the For loop body.
  • 1 mark for proper loop termination (EndFor / Next i).
✓ MODEL SOLUTION (Full Marks Guidance)
Architecture / Topology Diagram
Step 1: Start
Step 2: For i = 1 to 10 do
          Output i
        EndFor
Step 3: Stop

Examiner Commentary (Better Responses): Follow the reference model solution and step-by-step marking criteria.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Avoid syntax errors, missing loop termination conditions, or incomplete binary arithmetic carries.
Examiner Suggestion for Improvement: Practise writing complete JavaScript programs and binary arithmetic conversions step by step.
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
Write the name and draw the flowchart symbol in front of each description in the given table.
DescriptionNameFlowchart Symbol
All the decisions appear inside this symbol.
It is used to represent input and output in a flowchart.
📋 Official Checking Hints (Marking Rubric • 2 Marks)
  • 1 mark for each correct identification of name and symbol (TWO required).
  • 1 mark will be awarded if only names are written.
  • 1 mark will be awarded if only symbols are drawn.
✓ MODEL SOLUTION (Full Marks Guidance)
DescriptionNameFlowchart Symbol
All the decisions appear inside this symbol.Decision boxDiamond (◇)
It is used to represent input and output in a flowchart.Input / Output boxParallelogram (▱)

Examiner Commentary (Better Responses): In better responses, candidates accurately identified and placed the correct names and corresponding symbols by using the descriptions. For example, in the description 'All the decisions appear inside this symbol', candidates wrote the name decision box and drew a diamond symbol in their respective columns. Similarly, in the description 'it is used to represent input and output in a flowchart' candidates wrote the name input/ output box and drew a parallelogram symbol in their respective columns. These candidates showed familiarity with standard diagram conventions and applied their knowledge effectively.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.1
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, it was observed that candidates often managed to write either the correct name or the correct symbol, but not both. A common error was the incorrect identification of shapes, with many candidates labelled parallelograms and diamonds as names rather than recognising their symbolic meaning. In several cases, candidates were unable to identify either the correct name or the corresponding symbol, indicating a lack of conceptual clarity with standard conventions.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.1
Examiner Suggestion for Improvement: Teachers are recommended to encourage candidates to pay attention to the command words as well as focus on improving students' conceptual clarity through clear explanations and real-life examples related to the topic. Incorporating visual aids, such as diagrams and flowcharts, can help candidates better understand and differentiate between names and symbols.
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
Consider the given table.
DescriptionFlowchart Symbol (Shown in Diagram)
A. All the calculations appear inside this symbol.Circle (○)
B. It is used to connect various flowchart symbols.Parallelogram (▱)
C. It is used to represent input and output in a flowchart.Rectangle (▭)
D. It is used to connect one part of flowchart with another on the same page.Arrow (→)
Identify the CORRECT flowchart symbol for each description (A, B, C, D) in the given table.
Diagram for Q.1
📋 Official Checking Hints (Marking Rubric • 2 Marks)
  • 0.5 mark for each correctly matched/drawn flowchart symbol (4 × 0.5 = 2 Marks).
✓ MODEL SOLUTION (Full Marks Guidance)
DescriptionCorrect Flowchart SymbolSymbol Name
ARectangle (`▭`)Process Symbol (All arithmetic calculations and assignments appear inside a rectangle)
BArrow (`→`)Flowline Symbol (Connects various flowchart symbols and shows direction of flow)
CParallelogram (`▱`)Input / Output Symbol (Represents reading input or displaying output in a flowchart)
DCircle (`○`)On-Page Connector Symbol (Connects one part of a flowchart to another on the same page)

Examiner Commentary (Better Responses): In better responses, candidates accurately drew or identified the Rectangle for A (calculations/processing), the Flowline Arrow for B (connecting symbols), the Parallelogram for C (input/output), and the Circle for D (on-page connector).

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, candidates swapped the flowline arrow (B) and on-page circle connector (D), or wrote symbol names without drawing/identifying the corresponding shapes from the table.
Examiner Suggestion for Improvement: Emphasise the distinction between flowlines (arrows that connect adjacent steps) and on-page connectors (small circles labelled with letters/numbers to jump across a page without crossing lines).
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
Write the name and draw the flowchart symbol in front of each description in the given table.
DescriptionNameFlowchart Symbol
All the calculations appear inside this symbol.
It is used to connect various flowchart symbols.
📋 Official Checking Hints (Marking Rubric • 2 Marks)
  • 1 mark for each correct identification of name and symbol (TWO required).
  • 1 mark will be awarded if only names are written.
  • 1 mark will be awarded if only symbols are drawn.
✓ MODEL SOLUTION (Full Marks Guidance)
DescriptionNameFlowchart Symbol
All the calculations appear inside this symbol.ProcessRectangle (`▭`)
It is used to connect various flowchart symbols.Flow linesArrow (`→`)

Examiner Commentary (Better Responses): The candidates' responses to the flowchart question demonstrated an impressive understanding and proficiency in flowchart concepts. The symbols were accurately named ('Process' and 'Flow lines'), and their symbolic representations (Rectangle and Arrow lines) were aligned precisely with the given description.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.1
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
The candidates' responses displayed some inaccuracies in the association of different symbols within the flowchart and writing the wrong name against the description like 'flowchart', 'arrows', 'rectangle' and 'various flowchart' etc.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.1
Examiner Suggestion for Improvement: Teachers are advised to show a practical demonstration of the topic using different mockup tools such as Microsoft Visio or Balsamiq mockup etc. It will help them to understand the topic in depth.
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
An algorithm is a step by step solution to a given problem.
Read all FOUR steps of an algorithm and draw a flowchart for it.
1.Assign the value 0 to the variables SUM and N respectively.
2.Apply an increment on N by 1 and store the new value back in variable N.
3.Add the values of SUM and N. Store the result back in SUM variable.
4.If the value of N is equal to 50, then print the value of SUM otherwise repeat the steps 2, 3 and 4 until the value of N is equal to 50.
(Note: Use the same variable names in flowchart that are given in the algorithm.)
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for Start and Stop oval symbols.
  • 1 mark for initialising SUM = 0 and N = 0 in a process box.
  • 1 mark for incrementing N = N + 1 and updating SUM = SUM + N in process boxes.
  • 1 mark for decision diamond (Is N = 50?) with Yes/No branches looping back above N = N + 1.
  • 1 mark for printing SUM in an output parallelogram.
✓ MODEL SOLUTION (Full Marks Guidance)
Architecture / Topology Diagram
      ( Start )
          |
          v
  +---------------+
  |   SUM = 0     |
  |    N = 0      |
  +---------------+
          |
          +<------------+
          |             |
          v             |
  +---------------+     |
  |   N = N + 1   |     |
  +---------------+     |
          |             |
          v             |
  +---------------+     |
  | SUM = SUM + N |     |
  +---------------+     |
          |             |
          v             |
        /   \           |
      /  Is   \   No    |
     < N = 50? >--------+
      \       /
        \   /
          | Yes
          v
    /-----------/
   / PRINT SUM /
  /-----------/
          |
          v
       ( Stop )

Examiner Commentary (Better Responses): Better responses applied the correct flowchart symbols along with correct statements to design the required flowchart for the given scenario. Moreover, these responses paid attention to the note written in the question and used the same variable names as given in the scenario. These responses also connected the Yes and No arrows coming from the decision box to the correct points to depict the loop.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.1
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses were not able to apply either flowchart symbols to design the flowchart for the given scenario or if the symbols were correct, then the statements written in flowchart symbols were incorrect. Some of these responses did not pay attention to the note given in the question that candidates must use the same variable names as given in the question and they used other variable names and lost marks. Some of these responses connected yes and no lines coming from decision box at incorrect points to depict incorrect loop. Moreover, these responses showed confusion between input/output and processing boxes and used them in place of each other. Most of these responses wrote statement SUM = SUM + 1 that is used for counting instead of SUM = SUM + N that is required in the solution of the question for totaling.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.1
Examiner Suggestion for Improvement: Emphasise standard flowchart symbols (Oval for Start/Stop, Rectangle for Process/Assignment, Diamond for Decision, Parallelogram for Input/Output) and trace loop return arrows carefully.
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
The given flowchart takes temperature as input once a day for a year. It calculates and gives minimum, maximum and average temperature values as output. Some of the flowchart statements are missing. Complete the given flowchart by using the statement number only from the given table.
Statement NumberStatements
1X = X + 1
2Max = Temp
3Avg = Total / X
4Total = Total + Temp
5Min = Temp
6PRINT Min, Max, Avg
7READ Temp
8Is Temp < Min ?
9Is Temp > Max ?
10Is X <= 365 ?
Diagram for Q.1
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 0.5 mark for each correctly placed statement number (10 × 0.5 = 5 marks).
  • Note: The pair of statements 9 and 2 can be used in place of the pair of statements 8 and 5 and vice versa.
✓ MODEL SOLUTION (Full Marks Guidance)
Flowchart PositionSymbol ShapeStatement NumberStatement Text
Top loop condition diamondDiamond (◇)10Is X <= 365 ?
Right No branch process boxRectangle (▭)3Avg = Total / X
Right No branch output boxParallelogram (▱)6PRINT Min, Max, Avg
Down Yes branch input boxParallelogram (▱)7READ Temp
First inner decision diamondDiamond (◇)8 (or 9)Is Temp < Min ?
First inner Yes process boxRectangle (▭)5 (or 2)Min = Temp
Second inner decision diamondDiamond (◇)9 (or 8)Is Temp > Max ?
Second inner Yes process boxRectangle (▭)2 (or 5)Max = Temp
Accumulation process boxRectangle (▭)4Total = Total + Temp
Bottom loop counter increment boxRectangle (▭)1X = X + 1

Examiner Commentary (Better Responses): Better responses demonstrated that candidates had a clear understanding of the purpose of each flowchart symbol and inserted the statement numbers inside the relevant symbols in the required order. The pair of statements 9 and 2 can be used in the place of the pair of statements 8 and 5 and vice versa.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.1
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses depicted that candidates did not know clearly which statement number would go inside which flowchart symbol and placed incorrect statement numbers such as wrote statement 8 or 9 in place of statement 10, statement 3 in place of statement 1 and vice versa, statement 6 or 7 in place of statement 3, or statement 2 in place of statement 5 and vice versa.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.1
Examiner Suggestion for Improvement: Teach students to match flowchart shapes to statement types first (Diamonds -> conditions `8, 9, 10`; Parallelograms -> Input `7` / Output `6`; Rectangles -> calculations/assignments `1, 2, 3, 4, 5`).
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
An algorithm is a step by step solution to a given problem.
Read the given algorithm and draw a flowchart for it in the space provided.
1.Assign the value 0 to the variables SUM and N respectively.
2.Apply an increment on N by 1 and store the new value back in variable N.
3.Add the values of SUM and N. Store the result back in SUM variable.
4.If the value of N is equal to 50 then print the value of SUM otherwise repeat the steps 2, 3 and 4 until the value of N is equal to 50.
(Note: Use the same variable names in flowchart that are given in the algorithm.)
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for Start and End oval symbols.
  • 1 mark for initialising SUM = 0 and N = 0 in a process box.
  • 1 mark for incrementing N = N + 1 and updating SUM = SUM + N in process boxes.
  • 1 mark for decision diamond (If N = 50) with Yes/No branches looping back above N = N + 1.
  • 1 mark for printing SUM in an output parallelogram.
✓ MODEL SOLUTION (Full Marks Guidance)
Architecture / Topology Diagram
      ( START )
          |
          v
  +---------------+
  |   SUM = 0     |
  |    N = 0      |
  +---------------+
          |
          +<------------+
          |             |
          v             |
  +---------------+     |
  |   N = N + 1   |     |
  +---------------+     |
          |             |
          v             |
  +---------------+     |
  | SUM = SUM + N |     |
  +---------------+     |
          |             |
          v             |
        /   \           |
      /  Is   \   No    |
     < N = 50? >--------+
      \       /
        \   /
          | Yes
          v
    /-----------/
   / Print SUM /
  /-----------/
          |
          v
       ( END )

Examiner Commentary (Better Responses): Better responses demonstrated that candidates had clear understanding of purpose of each flowchart symbol and used correct flowchart symbols along with statements for each step of the algorithm given in question. Moreover, these responses connected the flowchart symbols in the correct order.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.1
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses depicted lack of understanding of flowchart symbols and did not know clearly which flowchart symbol should be used to perform the given task. Moreover, these responses were not able to connect the flowchart symbols in the correct sequence, assigned values to variables inside input/output symbols rather than processing symbols, or were not able to show looping using the decision box.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.1
Examiner Suggestion for Improvement: Ensure variable assignments (`SUM = 0`, `N = N + 1`, `SUM = SUM + N`) are placed inside rectangular process boxes rather than input/output parallelograms.
UNIT 10 • 21 SHORT QUESTIONS (CRQS)

Unit 10: Programming in JavaScript

2025 Syllabus Outcome (10.4.3): write JavaScript code to implement the following statements: a. if statement, b. if-else statement, c. if-else or if-else-if, d. switch statement;
Write a JavaScript code that uses the prompt( ) function to read a number from the user and display whether it is even or odd.
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for reading the number using prompt().
  • 1 mark for testing divisibility by 2 using if (num % 2 === 0).
  • 1 mark for displaying 'Even' and 'Odd' in the if and else branches.
✓ MODEL SOLUTION (Full Marks Guidance)
JAVASCRIPTSource Code
let num = Number(prompt("Enter a number:"));
if (num % 2 === 0) {
    document.write(num + " is an Even number.");
} else {
    document.write(num + " is an Odd number.");
}

Examiner Commentary (Better Responses): Follow the reference model solution and step-by-step marking criteria.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Avoid syntax errors, missing loop termination conditions, or incomplete binary arithmetic carries.
Examiner Suggestion for Improvement: Practise writing complete JavaScript programs and binary arithmetic conversions step by step.
2025 Syllabus Outcome (10.6.2): write JavaScript code to declare and initialise a one-dimensional array with different sizes and data types;
Write JavaScript code to declare and initialise a one-dimensional array that contains mixed data types (e.g., number, string, boolean, and null).
📋 Official Checking Hints (Marking Rubric • 2 Marks)
  • 1 mark for valid JavaScript array declaration (const / let / var with bracket notation [...]).
  • 1 mark for initialising elements of all four requested data types (number, string, boolean, and null).
✓ MODEL SOLUTION (Full Marks Guidance)
JAVASCRIPTSource Code
const mixedArray = [25, "Computer Science", true, null];
document.write(mixedArray);

Examiner Commentary (Better Responses): Follow the reference model solution and step-by-step marking criteria.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Avoid syntax errors, missing loop termination conditions, or incomplete binary arithmetic carries.
Examiner Suggestion for Improvement: Practise writing complete JavaScript programs and binary arithmetic conversions step by step.
2025 Syllabus Outcome (10.1.1): differentiate between program syntax and program semantics;
Describe program syntax and program semantics.
📋 Official Checking Hints (Marking Rubric • 2 Marks)
  • 1 mark for accurately describing program syntax.
  • 1 mark for accurately describing program semantics.
✓ MODEL SOLUTION (Full Marks Guidance)
•Program Syntax (1 Mark): Refers to the grammatical rules, spelling, punctuation, and structural format of a programming language that dictate how valid statements must be written (e.g., closing parentheses and using valid keywords like if (x > 0)). Violating syntax rules causes a compile-time/parse error.
•Program Semantics (1 Mark): Refers to the meaning and logical behaviour of a syntactically valid program statement when it executes (i.e., what the instruction actually does, such as whether a formula computes the intended result).

Examiner Commentary (Better Responses): Follow the reference model solution and step-by-step marking criteria.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Avoid syntax errors, missing loop termination conditions, or incomplete binary arithmetic carries.
Examiner Suggestion for Improvement: Practise writing complete JavaScript programs and binary arithmetic conversions step by step.
2025 Syllabus Outcome (10.4.3): write JavaScript code to implement the following statements: a. if statement, b. if-else statement, c. if-else or if-else-if, d. switch statement;
A 'C' program is written to take three integers with different values as an input and identify the largest number amongst them.
Write the missing code in the given box to achieve the mentioned task.
CSource Code
#include <stdio.h>
int main( )
{
  int n1, n2, n3;
  printf("Enter three different numbers: \n");
  scanf("%d %d %d", &n1, &n2, &n3);

  /* Write missing conditional logic here */

  return 0;
}
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • Give ONE mark for writing each conclusion (THREE required).
✓ MODEL SOLUTION (Full Marks Guidance)
Missing Conditional Code (C Language):
CSource Code
if ((n1 > n2) && (n1 > n3))
{
    printf("%d is the largest", n1);
}
else if ((n2 > n1) && (n2 > n3))
{
    printf("%d is the largest", n2);
}
else
{
    printf("%d is the largest", n3);
}
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
if ((n1 > n2) && (n1 > n3)) {
    document.write(n1 + " is the largest");
} else if ((n2 > n1) && (n2 > n3)) {
    document.write(n2 + " is the largest");
} else {
    document.write(n3 + " is the largest");
}

Examiner Commentary (Better Responses): In better responses, candidates accurately compared all three numbers by using the if-else-if structure and printed the largest number. For example, 1st number with the other two numbers, similarly, 2nd number, and 3rd number with the other two numbers. Their code demonstrated a solid understanding of conditional logic, and the syntax was written precisely without any errors.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.2
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, candidates used incorrect comparison operators, leading to flawed logic, and failed to include the third variable in their comparisons or used improper syntax for statements such as printf, if, and else-if. In several cases, it was evident that candidates lacked a clear understanding of how to apply conditional statements correctly, indicating a need for further reinforcement of fundamental programming concepts.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.2
Examiner Suggestion for Improvement: Teachers are encouraged to conduct regular practical sessions to help candidates strengthen their understanding of programming concepts through hands-on experience. Focused practice on structuring and implementing if-else-if conditions will help candidates to develop confidence and accuracy in writing decision-making code.
2025 Syllabus Outcome (10.5.3): write JavaScript code to implement the following loops: a. for loop, b. while loop, c. do while loop, d. nested loop;
Convert the following for loop into do-while loop.
CSource Code
for (int i=20;i<50;i+=5)
printf("\n%d", i);
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for initialisation of counter variable.
  • 1 mark for writing the correct condition using a do-while statement.
  • 1 mark for writing the correct increment statement.
  • Note: No mark deduction if the increment is done anywhere inside the body of the loop.
✓ MODEL SOLUTION (Full Marks Guidance)
Converted `do-while` Loop (C Language):
CSource Code
int i = 20;
do
{
    printf("\n%d", i);
    i += 5;
}
while (i < 50);
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
let i = 20;
do {
    document.write(i + "<br>");
    i += 5;
} while (i < 50);

Examiner Commentary (Better Responses): In better responses, candidates correctly applied the do-while structure to the given for loop code. They initialised the counter variable before the loop, placed the print and increment statements within the body of the do-while loop, and appropriately applied the loop condition outside the braces using the while( ) statement.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.3
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, candidates were confused regarding the structure of the do-while loop. They initialised the counter variable inside the loop body and placed the increment statement outside the loop, which led to logical errors in execution. A significant number of responses also showed that the candidates directly copied the syntax of a for loop into a do-while construct without adapting it to the correct format.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.3
Examiner Suggestion for Improvement: Teachers are suggested to conduct practice sessions on all three loop types, as candidates struggle with while and do-while loops. Students should practice inter-conversions of one loop structure to another loop structure.
2025 Syllabus Outcome (10.4.3): write JavaScript code to implement the following statements: a. if statement, b. if-else statement, c. if-else or if-else-if, d. switch statement;
A C program is written to take three angles of a triangle as an input and identify whether the formation of triangle is possible or not.
Complete the missing part in the program to achieve the given task.
CSource Code
#include <stdio.h>
int main() {
  float a1, a2, a3, sum;
  printf("Enter three angles of a triangle: \n");
  scanf("%f %f %f", &a1, &a2, &a3);

  /* Complete the missing code here */

  return 0;
}
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for calculating the sum of the three angles (sum = a1 + a2 + a3;).
  • 1 mark for writing the if condition checking whether sum == 180 (and printing that the triangle is valid).
  • 1 mark for writing the else branch printing that the formation of the triangle is not possible.
✓ MODEL SOLUTION (Full Marks Guidance)
Completed Missing Code (C Language):
CSource Code
sum = a1 + a2 + a3;
if (sum == 180 && a1 > 0 && a2 > 0 && a3 > 0)
{
    printf("Triangle formation is possible.\n");
}
else
{
    printf("Triangle formation is not possible.\n");
}
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
let sum = a1 + a2 + a3;
if (sum === 180 && a1 > 0 && a2 > 0 && a3 > 0) {
    document.write("Triangle formation is possible.");
} else {
    document.write("Triangle formation is not possible.");
}

Examiner Commentary (Better Responses): In better responses, candidates computed `sum = a1 + a2 + a3;`, used the relational equality operator `if (sum == 180)` (often additionally verifying positive angles), and printed clear messages in both the `if` and `else` blocks.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, candidates wrote if (sum = 180) (which always evaluates to true in C), omitted the sum = a1 + a2 + a3; calculation, or used scanf instead of printf for output.
Examiner Suggestion for Improvement: Reinforce the difference between the assignment operator (`=`) and the equality comparison operator (`==` / `===`) when writing conditional `if-else` statements.
2025 Syllabus Outcome (10.5.4): write the output of a given program having a loop and selection structures;
Consider the following C program.
CSource Code
#include <stdio.h>
int main() {
  int x=14;
  int y=20;
  while (y>x)
  {
    printf("\n%d", x);
    x+=2;
  }
  return 0;
}
Complete the trace table for the given program.
xyOutput
1420
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for correctly completing Iteration 1 (x = 14, y = 20, Output = 14).
  • 1 mark for correctly completing Iteration 2 (x = 16, y = 20, Output = 16).
  • 1 mark for correctly completing Iteration 3 (x = 18, y = 20, Output = 18) and showing x = 20, y = 20 where the loop terminates.
✓ MODEL SOLUTION (Full Marks Guidance)
IterationxyCondition (y > x)Output
1142020 > 14 (True)14
2162020 > 16 (True)16
3182020 > 18 (True)18
4 (Exit)202020 > 20 (False)(Loop terminates)

Examiner Commentary (Better Responses): In better responses, candidates respected the statement order inside the `while` loop (`printf` first, then `x += 2`), recording outputs `14`, `16`, and `18` while keeping `y = 20` constant, and stopping when `x` reached `20`.

⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
In weaker responses, candidates either incremented x before printing (producing 16, 18, 20) or modified y across rows.
Examiner Suggestion for Improvement: Guide students to trace loop bodies line-by-line in the exact order written: check whether the `printf` statement appears before or after the counter update (`x += 2`).
2025 Syllabus Outcome (10.4.3): write JavaScript code to implement the following statements: a. if statement, b. if-else statement, c. if-else or if-else-if, d. switch statement;
A C program is written to take three integers with different values as an input and also identify the largest number amongst them.
Write the missing code in the given box to achieve the mentioned task.
CSource Code
#include <stdio.h>
int main() {
  int n1, n2, n3;
  printf("Enter three different numbers: \n");
  scanf("%d %d %d", &n1, &n2, &n3);

  /* Write missing conditional code here */

  return 0;
}
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for writing each correct condition (THREE required).
✓ MODEL SOLUTION (Full Marks Guidance)
Missing Conditional Code (C Language):
CSource Code
if ((n1 > n2) && (n1 > n3))
    printf("Largest number is: %d", n1);
else if ((n2 > n1) && (n2 > n3))
    printf("Largest number is: %d", n2);
else
    printf("Largest number is: %d", n3);
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
if ((n1 > n2) && (n1 > n3)) {
    document.write("Largest number is: " + n1);
} else if ((n2 > n1) && (n2 > n3)) {
    document.write("Largest number is: " + n2);
} else {
    document.write("Largest number is: " + n3);
}

Examiner Commentary (Better Responses): Such responses exhibited a high level of competence as the candidates skilfully utilised the if-else-if structure to determine the largest among three numbers. The logical operator used was appropriate in if statements, ensuring the desired output is achieved upon implementing this program.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.2
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Such responses displayed areas for improvement in the candidates' program code. The absence of logical operators in the conditional statements resulted in the program's inability to evaluate the given conditions accurately, leading to incorrect outcomes.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.2
Examiner Suggestion for Improvement: Teachers are advised to give more practice programs to the candidates specifically on real-life scenarios for better understanding of the conditional statements.
2025 Syllabus Outcome (10.5.4): write the output of a given program having a loop and selection structures;
Consider the following C program.
CSource Code
#include <stdio.h>
int main() {
  int m=27;
  int n=36;
  do
  {
    printf("\n%d", n);
    n-=3;
  }
  while (m<n);
  return 0;
}
Complete the trace table for the given program.
mnOutput
2736
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for writing correct value of n and output of each iteration (THREE required).
  • No marks will be awarded if either n or output is missing.
✓ MODEL SOLUTION (Full Marks Guidance)
mnOutput
273636
273333
273030
2727— (Loop terminates since `27 < 27` is False)

Examiner Commentary (Better Responses): Some candidates' responses were exemplary as they efficiently populated the trace table with accurate values derived from executing the correct program. The calculated values in the 'n' column aligned precisely with the expected output (36, 33, 30, and terminating at 27).

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.3
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Such responses demonstrated inaccuracies in the execution, leading to incorrect values in the trace table. A common misunderstanding was that of the loop counter and the number of iterations in the do-while loop.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.3
Examiner Suggestion for Improvement: Teachers are advised to give more practice programs to the candidates for better understanding of the loop structures and trace tables.
2025 Syllabus Outcome (10.3.8): simplify an expression by using the order of precedence of operators;
Part (a) [3 Marks]:
Write a GW-BASIC program that
•inputs current (I) and voltage (V) value.
•calculates and outputs power (P) value.
*(Note: Formula for power is P=I×VP = I \times V)*
Part (b) [2 Marks]:
Determine whether the following expressions of GW-BASIC will be evaluated as TRUE (1) or FALSE (0).
GW-BASIC ExpressionTrue/ False
PRINT (3 * 3 / 3) > 3
PRINT (20 MOD 7) < 8
PRINT (5 + 5 - 5 * 5 / 5) = 5
PRINT (1 AND 0 OR 1 AND 0) = 1
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for inputting current (I) and voltage (V).
  • 1 mark for calculating power using programming multiplication operator (P = I * V).
  • 1 mark for outputting power (PRINT P).
  • 0.5 mark for each correct evaluation (4 × 0.5 = 2 marks).
✓ MODEL SOLUTION (Full Marks Guidance)
Part (a): Power Calculation (P=I×VP = I \times V)
GW-BASIC Program (2019 Exam):
BASICSource Code
10 CLS
20 INPUT "Current: "; I
30 INPUT "Voltage: "; V
40 LET P = I * V
50 PRINT "Power = "; P
60 END
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
let I = parseFloat(prompt("Enter current (I):"));
let V = parseFloat(prompt("Enter voltage (V):"));
let P = I * V;
document.write("Power (P) = " + P);
Part (b): Evaluating Operator Expressions
GW-BASIC ExpressionStep-by-Step EvaluationTrue / False
PRINT (3 * 3 / 3) > 3(9 / 3) > 3 ⇒3>3\Rightarrow 3 > 3False (`0`)
PRINT (20 MOD 7) < 86 < 8 (since 20=2×7+620 = 2 \times 7 + 6)True (`1`)
PRINT (5 + 5 - 5 * 5 / 5) = 5(5 + 5 - 25 / 5) = (10 - 5) = 5True (`1`)
PRINT (1 AND 0 OR 1 AND 0) = 1(0 OR 0) = 1 ⇒0=1\Rightarrow 0 = 1False (`0`)

Examiner Commentary (Better Responses): Part (a): Better responses demonstrated strong understanding of basic concepts of GW-BASIC programming. These responses wrote correct input and output statements and used * operator for multiplication in GW-BASIC statement to calculate power rather than using × as multiplication operator. Part (b): Better responses depicted strong understanding of almost all types of GW-BASIC operators and their evaluation in GW-BASIC statements, i.e. arithmetic operators, relational operators and logic operators.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.2
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Part (a): Weaker responses showed poor understanding of the basic concepts of GW-BASIC programming. These responses used mathematical multiplication operator rather than multiplication operator (*) of programming / these responses used values for voltage and current to calculate power just like a numerical rather than writing programming code for it. Most of these responses managed to correctly write the code to either print output or take input but struggled to write the formula of power in the form of GW-BASIC instruction. Likewise, another common mistake made by some of these responses was not using the comma between the message and variable name in the input statement and in output statement inverted commas were used around the name of the variable rather than writing it without commas. Part (b): Weaker responses were mostly unable to evaluate the second and the fourth GW-BASIC statements. It shows that candidates had poor understanding of modulus (MOD) and logic operators. However, most of these responses managed to evaluate the first and third GW-BASIC statements correctly that contain the arithmetic and relational operators.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.2
Examiner Suggestion for Improvement: Ensure students use the programming multiplication operator `*` instead of the algebraic `×` symbol and distinguish between string literals in quotes and variable names. Practice evaluating compound expressions combining modulus (`MOD` / `%`), arithmetic, relational, and logical (`AND`/`&&`, `OR`/`||`) operators step by step.
2025 Syllabus Outcome (10.5.4): write the output of a given program having a loop and selection structures;
Part (a) [4 Marks]:
Read the given GW-BASIC program.
BASICSource Code
10 X = 5
20 Y = 7
30 PRINT X
40 PRINT Y
50 FOR Z = 1 TO 3
60 X = X + Y
70 PRINT X
80 Y = X
90 NEXT Z
100 PRINT Y
Refer this program to complete the given table with the values of X, Y, Z and their respective output values.
Part (b) [1 Mark]:
In Computer Science examination, a student wrote the following working of IF…ELSE statement.
> 'An IF…ELSE statement executes IF-block statements when the condition is false and ELSE-block statements when the condition is true.'
However, there are two errors in this statement. Rewrite the correct statement after removing the errors.
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for tracing Z = 1, 2, 3 at Line 50.
  • 1 mark for tracing X = 12, 24, 48 at Line 60.
  • 1 mark for tracing Output = 12, 24, 48 at Line 70.
  • 1 mark for tracing Y = 12, 24, 48 at Line 80.
  • 1 mark for correctly rewriting the statement (IF-block executes when condition is true and ELSE-block executes when condition is false).
✓ MODEL SOLUTION (Full Marks Guidance)
Part (a): Loop Trace Table
Line NumberXYZOutput
105
207
305
407
501
6012
7012
8012
502
6024
7024
8024
503
6048
7048
8048
10048
Part (b): Working of IF...ELSE Statement
Corrected Statement:
> "An IF…ELSE statement executes IF-block statements when the condition is true and ELSE-block statements when the condition is false."

Examiner Commentary (Better Responses): Part (a): Better responses depicted that candidates interpreted the program correctly to complete the table. These responses calculated values of X, Y, Z and Output correctly with the help of GW-BASIC expressions given in the program and then wrote them in the correct line number of table. Part (b): Better responses depicted good theoretical understanding of IF...ELSE statement and wrote the correct statement after removing errors, i.e. an IF…ELSE statement executes IF-block statements when the condition is true and ELSE-block statements when the condition is false.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.3
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Part (a): Weaker responses mostly used the initial values of X and Y, i.e. X = 5 and Y = 7, for all calculations inside the loop instead of using updated values of X and Y due to which they got incorrect values in the table. Moreover, some of these responses wrote correct values of variables but in the incorrect line number of the table. Likewise, some of these responses managed to trace and write the value of counter variable Z and Output but struggled to trace the values of variables X and Y that involved calculations. Part (b): Weaker responses showed lack of understanding of theoretical concepts of IF...ELSE statement. They did not focus on the command word 'Rewrite' in the question and wrote irrelevant and incorrect descriptions rather than rewriting the correct version of the statement given in the question. Moreover, some of these responses showed confusion when an IF statement executes and when an ELSE statement executes.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.3
Examiner Suggestion for Improvement: Train students to update variable columns on the exact line where assignment occurs and use the newest value in subsequent loop iterations. Emphasise the exact execution flow of `if-else` selection structures when conditions evaluate to `true` vs. `false`.
2025 Syllabus Outcome (10.6.3): apply the process of traversing using all types of loops for input, output, and manipulation of elements;
Read the given GW-BASIC program to answer the following questions.
BASICSource Code
10 CLS
20 DIM A(15)
30 FOR X = 1 TO 15
40 INPUT A(X)
50 PRINT A(X) * A(X)
60 NEXT X
70 END
•a. What is the data type of array A? (1 Mark)
•b. Infer the purpose of this program. (1 Mark)
•c. The subscript of array A is changed to 22. Rewrite line 30 to input 22 values in array A. (1 Mark)
•d. Rewrite line 50 of this program so that it subtracts 5 from each element of array A and prints the result. (1 Mark)
📋 Official Checking Hints (Marking Rubric • 4 Marks)
  • 1 mark for part (a): Numeric data type.
  • 1 mark for part (b): Inputs 15 numbers and calculates/prints the square of each input number.
  • 1 mark for part (c): 30 FOR X = 1 TO 22.
  • 1 mark for part (d): 50 PRINT A(X) - 5.
✓ MODEL SOLUTION (Full Marks Guidance)
•a. Data type of array `A`: Numeric (Number) data type.
•b. Purpose of the program: To input 15 numeric values into array A and calculate and display the square of each input number.
•c. Rewritten Line 30 (for 22 values):
BASICSource Code
  30 FOR X = 1 TO 22
  
(JavaScript equivalent: `for (let x = 0; x < 22; x++)`)
•d. Rewritten Line 50 (subtracting 5 from each element):
BASICSource Code
  50 PRINT A(X) - 5
  
(JavaScript equivalent: `document.write(A[x] - 5);`)

Examiner Commentary (Better Responses): (a) Better responses understood the question well and wrote the data type of array, i.e. numeric or number, rather than writing the type of array, i.e. one-dimensional or two-dimensional array. (b) Better responses revealed that candidates interpreted the program given in the question very well and wrote the correct purpose of the program, that it will calculate and print the square of input of values. (c) Better responses demonstrated good understanding of FOR…NEXT loop and wrote the correct syntax of this loop with correct initial and final values of counter variable. (d) Better responses understood and answered this part correctly by rewriting the code in line 50 that subtracted 5 from each value of array.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.4
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
(a) Weaker responses did not understand the question well and wrote the type of array such as one-dimensional array or two-dimensional array rather than writing the data type of array that is numeric. (b) Weaker responses described the program rather than inferring the purpose of the program (e.g., 'it multiplies two numbers' or 'uses FOR loop for repetition'). (c) These responses wrote code that was incorrect due to the incorrect range of FOR…NEXT loop (mostly the final value). (d) Weaker responses mostly misunderstood the question and wrote the code that subtracted 5 from the square value of array elements (50 PRINT (A(X) * A(X)) - 5) or subtracted same array element from itself rather than rewriting the code correctly.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.4
Examiner Suggestion for Improvement: Clarify the distinction between an array's **dimension** (1D vs. 2D) and its **element data type** (Numeric vs. String/Boolean).
Q.52019 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): User-Defined Functions (DEF FN) — Retired 2012 Syllabus Topic
Write a GW-BASIC program that
•contains user-defined function named EQU to solve the equation Z=2X+3Y−2Z = 2X + 3Y - 2
•inputs two numeric values.
•calls the function EQU and outputs value.
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for defining the function using DEF FNEQU(X, Y) = (2 * X) + (3 * Y) - 2.
  • 1 mark for inputting two numeric values.
  • 1 mark for calling FNEQU and printing the result.
✓ MODEL SOLUTION (Full Marks Guidance)
GW-BASIC Program (2019 Exam — Out of 2025 Syllabus):
BASICSource Code
10 CLS
20 DEF FNEQU(X, Y) = (2 * X) + (3 * Y) - 2
30 INPUT "Enter first value: "; A
40 INPUT "Enter second value: "; B
50 PRINT FNEQU(A, B)
60 END

Examiner Commentary (Better Responses): Better responses demonstrated good application skills of user-defined functions in GW-BASIC and wrote correct syntax for naming, writing expression and calling user-defined function to print the values.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.5
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses did not know where a user-defined function is defined in a program and were not able to write the correct syntax to define it. However, there were few responses that managed to either write the arithmetic expression for the user-defined function correctly or call the user-defined function correctly to print the values and were given partial credit.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.5
Examiner Suggestion for Improvement: Note: User-defined functions (`DEF FN`) are retired from the 2025 Class X Computer Science syllabus.
2025 Syllabus Outcome (10.3.1): write a JavaScript program to solve arithmetic problems by using arithmetic operators;
Part (a) [3 Marks]:
Write a GW-BASIC program that would calculate and give simple interest as output. The input would be the principal amount, interest rate per year and the number of years.
The formula to calculate simple interest is given below:
(Principal Amount×Interest Rate per Year×Number of Years)÷100(\text{Principal Amount} \times \text{Interest Rate per Year} \times \text{Number of Years}) \div 100
Part (b) [2 Marks]:
There are SIX relational operators in GW-BASIC.
Complete the given table by writing the operations and symbols of relational operators.
(Note: The first operation has been mentioned for your convenience.)
OperationSymbol
Equal to=
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for inputting Principal Amount (P), Interest Rate (I/R), and Number of Years (Y/T).
  • 1 mark for calculating Simple Interest S = (P * I * Y) / 100 using programming arithmetic operators (* and /).
  • 1 mark for displaying Simple Interest in output.
  • 2 marks for completing all 5 remaining relational operations and their programming symbols.
✓ MODEL SOLUTION (Full Marks Guidance)
Part (a): Simple Interest Calculation Program
GW-BASIC Program (2018 Exam):
BASICSource Code
10 CLS
20 INPUT "Principal Amount = "; P
30 INPUT "Interest rate per year = "; I
40 INPUT "Number of years = "; Y
50 LET S = (P * I * Y) / 100
60 PRINT "Simple Interest is = "; S
70 END
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
let P = parseFloat(prompt("Enter Principal Amount:"));
let R = parseFloat(prompt("Enter Interest Rate per Year:"));
let T = parseFloat(prompt("Enter Number of Years:"));
let SI = (P * R * T) / 100;
document.write("Simple Interest is = " + SI);
Part (b): Six Relational Operators & Symbols
OperationGW-BASIC Symbol2025 JavaScript Symbol (10.3.4)
Equal to (given)=== / ===
Not equal to`<>``!=` / `!==`
Greater than`>``>`
Less than`<``<`
Greater than or equal to`>=``>=`
Less than or equal to`<=``<=`

Examiner Commentary (Better Responses): Part (a): Better responses depicted good understanding of basic concepts of GW-BASIC programming, i.e. input from the user, performed calculations on input by writing the formula in GW-BASIC and displayed output with an appropriate message. Part (b): Better responses wrote the correct names of relational operators and their symbols (`<>`, `>`, `<`, `>=`, `<=`).

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.2
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Part (a): Weaker responses showed poor understanding of basic concepts of GW-BASIC programming and wrote incorrect GW-BASIC statements such as incorrect input statement, used constant values for principal amount, interest per year and number of years, used arithmetic operator of mathematics for division and multiplication rather than of GW-BASIC, or did not assign the result of arithmetic formula to a variable. Part (b): Weaker responses showed confusion between relational and arithmetic operators and wrote names and symbols of arithmetic operators in the place of relational operators, wrote mathematical symbols (≤, ≥, ≠, ∈) of relational operators rather than programming symbols, or wrote 'lesser than and/or greater than' instead of 'not equal to' for relational operator <>.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.2
Examiner Suggestion for Improvement: Ensure students use variables (not hardcoded numbers) in input statements and use `*` and `/` for multiplication and division. Contrast mathematical notation (`=`, `≠`, `≤`, `≥`) with programming relational operators (`<>` in GW-BASIC; `==`, `===`, `!=`, `!==`, `<=`, `>=` in JavaScript).
Q.32018 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): Legacy GW-BASIC Repetition Using IF...THEN...ELSE and GOTO Statements (Retired 2012 Syllabus)
Loops are used for repetition of code in any programming language. However, it is possible to repeat a program code without using the loop as well.
Write a GW-BASIC program that would display the following text TEN times on output screen by using IF…THEN…ELSE and GOTO statements.
I LOVE PAKISTAN
(Note: Do NOT use any type of loops.)
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for initialising counter variable (e.g., A = 1) and incrementing it (A = A + 1).
  • 1 mark for IF condition checking counter <= 10 and printing 'I LOVE PAKISTAN'.
  • 1 mark for GOTO statement looping back to the IF line and terminating when counter > 10.
✓ MODEL SOLUTION (Full Marks Guidance)
GW-BASIC Program Using `IF...THEN...ELSE` & `GOTO` (2018 Exam — Out of 2025 Syllabus):
BASICSource Code
10 CLS
20 LET A = 1
30 IF A <= 10 THEN PRINT "I LOVE PAKISTAN" ELSE GOTO 60
40 A = A + 1
50 GOTO 30
60 END
2025 Syllabus Loop Equivalent (JavaScript `10.5.3`):
JAVASCRIPTSource Code
for (let a = 1; a <= 10; a++) {
    document.write("I LOVE PAKISTAN<br>");
}

Examiner Commentary (Better Responses): Better responses demonstrated a good understanding of repetition via IF statement in GW-BASIC. These responses wrote the correct condition of the IF statement and used a counter variable to count the number of iterations and printed the statement given in the question.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.3
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses did not write the correct program and made common mistakes such as used FOR loop, did not use IF condition in program, wrote incorrect condition of IF statement, or did not use GOTO statement or counter variable.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.3
Examiner Suggestion for Improvement: Note: `GOTO` line-number branching is retired from the 2025 Class X syllabus; in JavaScript (`10.5.3`), repetition is implemented using `for`, `while`, or `do-while` loops.
2025 Syllabus Outcome (10.6.1): explain the array concerning the array name, size, index number, and arrangement of elements in the memory;
•a. Identify whether the given array representation is a one-dimensional array or two-dimensional array? (1 Mark)
ElementValue
X$(0)Lahore
X$(1)Karachi
X$(2)Quetta
X$(3)Peshawar
X$(4)Islamabad
•b. State the major reason to support your selection of array in part (a). (1 Mark)
•c. If Hyderabad, Faisalabad, Khairpur, Gujranwala, Sukkur and Jacobabad are to be added to the array shown in part (a), then what would be the index number of the last element? (1 Mark)
•d. By looking at the array representation in part (a), how can one judge the data type of this array? (1 Mark)
📋 Official Checking Hints (Marking Rubric • 4 Marks)
  • 1 mark for part (a): One-dimensional array.
  • 1 mark for part (b): It contains only one subscript/index per element (or has one column of values).
  • 1 mark for part (c): 10 (or X$(10)).
  • 1 mark for part (d): String data type because of the '′signattachedtothearraynameX' sign attached to the array name X (or because it stores text/city names).
✓ MODEL SOLUTION (Full Marks Guidance)
•a. Array Type: One-dimensional (1D) array.
•b. Reason: Each element is referenced using a single subscript (index) inside parentheses (`X(0)‘through‘X(0)` through `X(4)`), storing values in a single linear list.
•c. Index Number of the Last Element: `10` (i.e., `X$(10)`, since adding 6 cities to indices `0..4` occupies indices `5, 6, 7, 8, 9, 10`).
•d. Judging the Data Type: The data type is String, identified by the dollar sign (**`‘∗∗)inthearrayname‘X`**) in the array name `X` (and the text values representing city names).

Examiner Commentary (Better Responses): Better responses showed good visual understanding of arrays and identified array as one-dimensional, gave the correct reason to identify the array, i.e. it has one column only / it has single subscript value. Similarly, these responses wrote 10 as an index number in part (c) which means they know that index number starts from 0. Likewise, they wrote a $ symbol to determine the data type of array as string.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.4
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses mostly identified the array given in this question as two-dimensional instead of one-dimensional which means they considered the column containing index numbers of the array as the second column of the array and wrote the same reason for the identification. Similarly, most of these responses wrote index number 11 to answer part (c) which means they have considered 1 as the first index number of the array instead of 0. Moreover, most of these responses answered part (d) of this question correctly, i.e. data type of array can be determined as string by looking at $.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.4
Examiner Suggestion for Improvement: Emphasise 0-based indexing (`0` to `n - 1`): when 6 elements are added to 5 existing elements (`0..4`), the 11th element is at index `10`.
Q.52018 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): User-Defined Functions (DEF FN) — Retired 2012 Syllabus Topic
Write a user-defined function (using GW-BASIC) named CUBE to calculate the cube of any positive integer value. Input any integer value from user; call this function and print the output.
The formula to calculate the cube of any integer A is given below:
The formula for Cube=A×A×A\text{The formula for Cube} = A \times A \times A
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for defining the function: DEF FNCUBE(A) = A * A * A.
  • 1 mark for inputting an integer value from the user.
  • 1 mark for calling FNCUBE and printing the output.
✓ MODEL SOLUTION (Full Marks Guidance)
GW-BASIC Program (2018 Exam — Out of 2025 Syllabus):
BASICSource Code
10 CLS
20 DEF FNCUBE(A) = A * A * A
30 INPUT "Enter the number: "; N
40 PRINT FNCUBE(N)
50 END

Examiner Commentary (Better Responses): Better responses used the correct syntax to define the function named CUBE with an appropriate number of function parameters. Furthermore, these responses transformed the formula to calculate the cube in GW-BASIC instruction correctly and finally printed the value of cube function by calling the function with the PRINT keyword.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.5
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses were not able to write the correct GW-BASIC code to define the function with the proper keyword (DEF FN) and the function name and instead of that, most of the responses wrote DEF keyword only. Likewise, these responses invoked the defined function incorrectly.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.5
Examiner Suggestion for Improvement: Note: User-defined functions (`DEF FN`) are retired from the 2025 Class X Computer Science syllabus.
2025 Syllabus Outcome (10.3.5): use the following logical operators in a JavaScript code: a. AND (&&), b. OR (||), c. NOT (!);
Part (a) [3 Marks]:
Write any ONE valid symbol in the given space for each of the stated operators.
•i. Logic Operators (1 Mark)
•ii. Arithmetic Operators (1 Mark)
•iii. Relational Operators (1 Mark)
Part (b) [2 Marks]:
Three GW-BASIC variables are listed below.
•Z%
•Y#
•X$
Categorise them in the given table.
Variable with String Data TypeVariable with Integer Data Type
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for any one valid Logic Operator (AND, OR, NOT / &&, ||, !).
  • 1 mark for any one valid Arithmetic Operator (+, -, *, /, MOD / %).
  • 1 mark for any one valid Relational Operator (=, <>, <, >, <=, >= / ==, ===, !=, !==).
  • 1 mark for placing X$ under Variable with String Data Type.
  • 1 mark for placing Z% under Variable with Integer Data Type (excluding Y#, which is double-precision).
✓ MODEL SOLUTION (Full Marks Guidance)
Part (a): Valid Symbols for Logic, Arithmetic & Relational Operators
Operator CategoryGW-BASIC Symbol(s)2025 JavaScript Symbol(s)
i. Logic OperatorsAND, OR, NOT&& (AND), ` (OR), !` (NOT)
ii. Arithmetic Operators+, -, *, /, ^, MOD+, -, *, /, %, **
iii. Relational Operators=, <>, <, >, <=, >===, ===, !=, !==, <, >, <=, >=
Part (b): Categorising GW-BASIC Variables (Z%, Y#, X$)
Variable with String Data TypeVariable with Integer Data Type
`X$``Z%`
(Note: `Y#` is a double-precision floating-point variable, so it is omitted from both columns.)

Examiner Commentary (Better Responses): Part (a): Better responses showed good knowledge of logic, arithmetic and relational operators and wrote the correct symbols for each type of operator. Part (b): Better responses identified X$ as string variable and Z% as integer variable which shows that candidates know the purpose of data type symbols with variable names.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.2
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Part (a): Weaker responses depicted poor understanding of all three types of operators and wrote the purpose of each type of operator or wrote mathematical operators instead of programming operators (for example, in arithmetic operator they wrote × instead of *). Part (b): Weaker responses mostly identified string variable correctly but could not identify the integer variable correctly. These responses identified both Y# and Z% as integer variables rather than identifying only Z% as integer variable because Y# is a double-precision variable.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.2
Examiner Suggestion for Improvement: Remind students to write programming operator symbols (`*`, `/`, `&&`/`AND`, `<>`/`!=`) rather than algebraic symbols (`×`, `÷`). Note: GW-BASIC type-declaration suffixes (`$`, `%`, `#`, `!`) are retired in the 2025 JavaScript syllabus (`10.2.2`).
2025 Syllabus Outcome (10.5.3): write JavaScript code to implement the following loops: a. for loop, b. while loop, c. do while loop, d. nested loop;
Read the GW-BASIC code given below.
BASICSource Code
10 CLS
20 FOR Count = 0 TO 4
30 PRINT "*"
40 NEXT
50 END
•a. Which of the following outputs, A (five vertical * lines) or B (four vertical * lines), is correct for the given GW-BASIC code? (1 Mark)
•b. REWRITE the given GW-BASIC code using WHILE…WEND loop. (4 Marks)
📋 Official Checking Hints (Marking Rubric • 5 Marks)
  • 1 mark for part (a): Output A (5 asterisks).
  • 4 marks for part (b): Initialising Count = 0, WHILE Count <= 4, PRINT "*", Count = Count + 1, and WEND.
✓ MODEL SOLUTION (Full Marks Guidance)
•a. Correct Output: A (prints ` five times on separate lines for Count = 0, 1, 2, 3, 4`)*.
•b. Rewritten Code Using `WHILE…WEND` (GW-BASIC):
BASICSource Code
10 CLS
20 LET Count = 0
30 WHILE Count <= 4
40 PRINT "*"
50 Count = Count + 1
60 WEND
70 END
2025 Syllabus Equivalent (JavaScript `while` Loop):
JAVASCRIPTSource Code
let count = 0;
while (count <= 4) {
    document.write("*<br>");
    count++;
}

Examiner Commentary (Better Responses): Better responses selected A as output of the given program which means candidates had clear understanding that loop will iterate 5 times (starting from 0 and ending at 4). Moreover, these responses converted the given FOR loop program correctly into WHILE…WEND program and placed the programming statements in correct order.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.3
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses selected B as output of the given program which means candidates only focused on the ending value of loop which is 4. Moreover, these responses could not convert the given FOR loop program correctly into WHILE…WEND program and wrote incorrect loop range or mixed WHILE…WEND and FOR loop statements.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.3
Examiner Suggestion for Improvement: Count loop iterations inclusively from `0` to `4` ($4 - 0 + 1 = 5$ iterations) and ensure explicit counter initialisation and increment inside a `while` loop.
2025 Syllabus Outcome (10.6.2): write JavaScript code to declare and initialise a one-dimensional array with different sizes and data types;
There are 900 students studying in a school. The school wants to record the names and ages of these students. Write GW-BASIC syntax to declare a
•a. one-dimensional array with appropriate subscript to store the name of students. (2 Marks)
•b. two-dimensional array with appropriate subscripts to store the age of students. (2 Marks)
📋 Official Checking Hints (Marking Rubric • 4 Marks)
  • 2 marks for part (a): 10 DIM N(900)or10DIMN(900) or 10 DIM N(899) (string 1D array).
  • 2 marks for part (b): 10 DIM A(30, 30) or (150, 6) / (15, 60) / (90, 10) / (36, 25) (numeric 2D array totaling 900 elements).
✓ MODEL SOLUTION (Full Marks Guidance)
•a. 1D Array to Store Names of 900 Students:
•GW-BASIC: `10 DIM N(900)‘∗(or‘10DIMN(900)` *(or `10 DIM N(899)`)*
•2025 JavaScript (`10.6.2`): let studentNames = new Array(900);
•**b. 2D Array to Store Ages of 900 Students (Retired 2D Array Topic):**
•GW-BASIC: 10 DIM A(30, 30) (or `DIM A(90, 10)`, `DIM A(150, 6)`, `DIM A(15, 60)`, `DIM A(36, 25)`)

Examiner Commentary (Better Responses): Better responses declared arrays with proper name, correct data type and size of array, i.e. array size is 900 or 899 for one-dimensional array and array size is (30, 30), (150, 6), (15, 60), (90, 10), or (36, 25) in case of two-dimensional array.

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.4
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses did not specify the correct data type, name and size of array. In most of these responses, name of array was not mentioned and, instead of defining size of an array by using numeric value (subscript), candidates wrote textual data or INPUT statements.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.4
Examiner Suggestion for Improvement: Under the 2025 Class X syllabus (`10.6.2`), focus on declaring and initialising 1D arrays in JavaScript (`let studentNames = new Array(900);`); note that 2D arrays are retired.
Q.52017 Annual Paper II ↗Out of 2025 Syllabus
Total 3 Marks • Level A
2025 Syllabus Outcome (): Legacy GW-BASIC Built-in Functions (ABS, SQR, LEFT$ — Retired 2012 Syllabus)
Read the GW-BASIC codes given in boxes and write the output of each.
1.Box 1:
BASICSource Code
10 CLS
20 LET H = -115.46
30 PRINT ABS(H)
40 END
2.Box 2:
BASICSource Code
10 CLS
20 LET G = 25
30 PRINT SQR(G)
40 END
3.Box 3:
BASICSource Code
10 CLS
20 LET N$ = "Kentucky"
30 PRINT LEFT$(N$, 4)
40 END
📋 Official Checking Hints (Marking Rubric • 3 Marks)
  • 1 mark for Box 1 output: 115.46.
  • 1 mark for Box 2 output: 5.
  • 1 mark for Box 3 output: Kent.
✓ MODEL SOLUTION (Full Marks Guidance)
1.Box 1 (`ABS(-115.46)`): `115.46` (returns the positive absolute value)
2.Box 2 (`SQR(25)`): `5` (returns the principal square root of 25)
3.Box 3 (`LEFT$("Kentucky", 4)`): `Kent` (extracts the first 4 characters from the left)

Examiner Commentary (Better Responses): Better responses showed good understanding of the built-in functions 'ABS', 'SQR' and 'LEFT$' in GW-BASIC by writing the correct output (`115.46`, `5`, and `Kent`).

Authentic E-Marking Better Candidate Script:
Better candidate script for Q.5
⚠ WEAKER RESPONSE (Common Misconceptions & Lost Marks)
Weaker responses demonstrated lack of understanding of the built-in functions in GW-BASIC and wrote the incorrect output: most mentioned that ABS rounds off or removes the decimal part (115), wrote the square of 25 (625) instead of the square root for SQR, or wrote the four right characters for LEFT$.
Authentic E-Marking Weaker Candidate Script:
Weaker candidate script for Q.5
Examiner Suggestion for Improvement: Note: GW-BASIC built-in functions (`ABS`, `SQR`, `LEFT$`) are retired from the 2025 Class X Computer Science syllabus.