← Computer Science X past papers

Computer Science X · 2019 · E-Marking Notes (Questions & Solved Better Responses)

AGA KHAN UNIVERSITY EXAMINATION BOARD
Notes from E-Marking Centre on SSC-II Computer Science Annual Examinations 2019
Digital Edition: Questions, Marking Schemes & Solved Better Responses (2025 Syllabus Aligned)
Q.1Constructed Response Questions (CRQs)
2025 Syllabus Outcome (9.1.2): draw flowcharts related to SLO # 9.1.1.
Question Text
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.)
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (5/5)
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 )
Q.2aConstructed Response Questions (CRQs)
2025 Syllabus Outcome (10.3.1): write a JavaScript program to solve arithmetic problems by using arithmetic operators;
Question Text
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)*
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (3/3)
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);
Q.2bConstructed Response Questions (CRQs)
2025 Syllabus Outcome (10.3.8): simplify an expression by using the order of precedence of operators;
Question Text
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
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (2/2)
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`)
Q.3aConstructed Response Questions (CRQs)
2025 Syllabus Outcome (10.5.4): write the output of a given program having a loop and selection structures;
Question Text
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.
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (4/4)
Line NumberXYZOutput
105
207
305
407
501
6012
7012
8012
502
6024
7024
8024
503
6048
7048
8048
10048
Q.3bConstructed Response Questions (CRQs)
2025 Syllabus Outcome (10.4.2): explain the structure of if, if-else, nested if-else, or if-else-if and switch statement;
Question Text
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.
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (1/1)
Corrected Statement:
> "An IF…ELSE statement executes IF-block statements when the condition is true and ELSE-block statements when the condition is false."
Q.4Constructed Response Questions (CRQs)
2025 Syllabus Outcome (10.6.3): apply the process of traversing using all types of loops for input, output, and manipulation of elements;
Question Text
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)
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (4/4)
•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);`)
Q.5Constructed Response Questions (CRQs)
Out of 2025 Syllabus3 Marks • Level Application
Question Text
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.
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (3/3)
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
Q.6Constructed Response Questions (CRQs)
Out of 2025 Syllabus3 Marks • Level Application
Question Text
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
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (3/3)
ABCA‾\overline{A}B⋅CB \cdot CX=A‾+(B⋅C)X = \overline{A} + (B \cdot C)
000101
001101
010101
011111
100000
101000
110000
111011
Q.7aExtended Response Questions (ERQs)
2025 Syllabus Outcome (12.1.6): examine the health concerns associated with the excessive use of ICT devices and their impact on well-being;
Question Text
EITHER (a): Describe any FOUR positive and any FOUR negative impacts of computer on society. (8 Marks)
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (8/8)
Four Positive Impacts of Computers on Society:
1.Fast Global Communication: Enables instant long-distance communication, email, and video conferencing, saving time and travel costs.
2.Remote Work & Employment Opportunities: Creates new jobs in IT, software development, e-commerce, and online freelancing, allowing individuals to work from home globally.
3.Accessible E-Learning & Education: Provides access to online courses, digital libraries, and virtual classrooms from world-class institutions.
4.Paperless Environment & Fast Public Services: Automates banking, healthcare, and airline reservation systems while reducing paper consumption and environmental waste.
Four Negative Impacts of Computers on Society:
1.Health & Well-Being Risks: Prolonged screen time and poor posture cause eye strain, headaches, musculoskeletal pain, and obesity from physical inactivity.
2.Social Isolation: Excessive use of digital devices and social media reduces face-to-face family and community interaction.
3.Rapid Spread of Misinformation & Cyberbullying: Online platforms can be misused to spread rumours, fake news, and cyberbullying.
4.Automation & Job Displacement: Computerised automation of manual clerical and factory tasks can displace unskilled workers.
Q.7bExtended Response Questions (ERQs)
2025 Syllabus Outcome (12.1.3): explain key concepts of copyright, plagiarism, and piracy;
Question Text
OR (b): Describe the importance of having licence of a computer software from the users' point of view in FOUR points and the owner's (one who owns and sells software) point of view in FOUR points. (8 Marks)
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (8/8)
Importance of Software Licensing — User's Point of View (4 Points):
1.Protection from Malware & Viruses: Licensed software comes from verified publishers and is free from hidden Trojans, spyware, or ransomware often bundled in pirated copies.
2.Official Updates & Security Patches: Licensed users receive regular bug fixes, feature upgrades, and security patches.
3.Technical Support & Documentation: Users gain access to official customer support, manuals, and warranty assistance.
4.Legal & Ethical Compliance: Using licensed software protects individuals and organisations from copyright infringement penalties and legal prosecution.
Importance of Software Licensing — Owner's / Developer's Point of View (4 Points):
1.Fair Financial Compensation: Licensing ensures developers and software companies are paid for their time, effort, and investment.
2.Intellectual Property & Copyright Protection: Prevents unauthorised copying, redistribution, or reverse-engineering of proprietary code.
3.Funding Research & Future Versions: Revenue from software licences funds ongoing R&D, maintenance, and development of improved future releases.
4.Control Over Usage Terms: Allows the owner to define clear legal terms regarding the number of installations, commercial use, and liability.
Q.8aExtended Response Questions (ERQs)
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;
Question Text
EITHER (a): Write a GW-BASIC program to be used in a restaurant that
•inputs total number of items purchased by each customer.
•inputs the price of each item and adds them to get the total price.
•calculates 13% as tax amount on the total bill (Formula to Calculate Tax = Total Price × 0.13).
•adds total price and tax amount to get the amount of total bill.
•outputs the amount of total bill.
•calculates and outputs the service charges according to the given criteria:
Total BillService Charges
1 to 10000 Rupees250
More than 10000 Rupees500
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (7/7)
GW-BASIC Program (2019 Exam):
BASICSource Code
10 CLS
20 SUM = 0
30 INPUT "Enter number of items purchased: "; N
40 FOR A = 1 TO N
50 INPUT "Enter price of item: "; P
60 SUM = SUM + P
70 NEXT A
80 TAX = SUM * 0.13
90 TB = SUM + TAX
100 PRINT "The Total Bill is: "; TB
110 IF TB >= 1 AND TB <= 10000 THEN SC = 250 ELSE SC = 500
120 PRINT "The Service Charges are: "; SC
130 END
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
let n = parseInt(prompt("Enter total number of items purchased:"));
let totalPrice = 0;
for (let i = 1; i <= n; i++) {
    let price = parseFloat(prompt("Enter price of item " + i + ":"));
    totalPrice += price;
}
let tax = totalPrice * 0.13;
let totalBill = totalPrice + tax;
document.write("Total Bill: " + totalBill + "<br>");
let serviceCharges = (totalBill <= 10000) ? 250 : 500;
document.write("Service Charges: " + serviceCharges);
Q.8bExtended Response Questions (ERQs)
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;
Question Text
OR (b): A cab service (taxi car) needs a program to calculate the bill of customers.
Write a GW-BASIC program for the cab service that
•inputs number of kilometres travelled.
•charges 30 rupees per kilometre for initial 5 kilometres.
•charges 25 rupees for each kilometre after 5 kilometres.
•adds fixed amount of 50 rupees in total charges.
•outputs the bill.
✓ BETTER RESPONSE (SOLVED MODEL ANSWER)Full Marks (7/7)
GW-BASIC Program (2019 Exam):
BASICSource Code
10 CLS
20 INPUT "Enter total kilometres travelled: "; D
30 IF D <= 5 THEN SUBCOST = D * 30 ELSE SUBCOST = (5 * 30) + ((D - 5) * 25)
40 BILL = SUBCOST + 50
50 PRINT "Total Cab Service Bill = "; BILL
60 END
2025 Syllabus Equivalent (JavaScript):
JAVASCRIPTSource Code
let d = parseFloat(prompt("Enter number of kilometres travelled:"));
let subCost;
if (d <= 5) {
    subCost = d * 30;
} else {
    subCost = (5 * 30) + ((d - 5) * 25);
}
let totalBill = subCost + 50;
document.write("Total Cab Bill: Rs. " + totalBill);