0% found this document useful (0 votes)
2 views8 pages

IGCSE_Computer_Science_Paper2_Master_Notes_Complete

The document is a comprehensive revision guide for the IGCSE Computer Science syllabus covering algorithm design, programming concepts, and exam strategies. It details the Program Development Life Cycle, data types, pseudocode syntax, validation checks, and various algorithms. Additionally, it provides a structured approach to solving exam scenario questions with a complete example algorithm for tracking robot test scores.

Uploaded by

mufaronmadziwa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

IGCSE_Computer_Science_Paper2_Master_Notes_Complete

The document is a comprehensive revision guide for the IGCSE Computer Science syllabus covering algorithm design, programming concepts, and exam strategies. It details the Program Development Life Cycle, data types, pseudocode syntax, validation checks, and various algorithms. Additionally, it provides a structured approach to solving exam scenario questions with a complete example algorithm for tracking robot test scores.

Uploaded by

mufaronmadziwa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IGCSE Computer Science (0478 / 2210)

Ultimate Paper 2 Master Revision Guide — Every Syllabus Topic Exhaustively Covered

1. TOPIC 7: ALGORITHM DESIGN & PROBLEM SOLVING


1.1 Program Development Life Cycle (PDLC)
Software is built through 5 distinct phases:
• Analysis: Requirements are gathered, problem is decomposed, inputs/outputs/processes identified, boundary conditions
established.
• Design: Algorithms planned using structure diagrams, flowcharts, pseudocode. Data structures, validation rules, test plans defined.
• Coding: Writing the solution in a high-level programming language (Python, [Link], Java).
• Testing: Executing code with test data (Normal, Boundary, Extreme, Invalid) to find syntax, logic, and runtime errors.
• Maintenance: Ongoing updates: Corrective (bug fixes), Adaptive (system/OS updates), Perfective (performance upgrades).

1.2 Computer Systems, Sub-systems, Abstraction & Decomposition


• Computer System: Hardware and software components working together to process data into useful information.
• Sub-system: A smaller, self-contained component within a larger system that performs a dedicated task.
• Decomposition: Breaking down a complex system or algorithm into smaller, more manageable sub-systems/modules.
• Abstraction: Hiding unnecessary technical details and focusing only on the essential features required to solve a problem.
• Component Parts of a Computer System: Inputs, Processing, Storage, Outputs, Communications.

1.3 Structure Diagrams & Component Design


Structure diagrams illustrate modular decomposition top-down. The top box represents the entire problem, branches represent sub-
systems, and leaf nodes represent indivisible operations.

1.4 Standard Flowchart Symbols & Conventions


Symbol Name Visual Shape Function / Usage Pseudocode Equivalent

Terminator Oval / Rounded Rectangle Marks the exact start or end point of an algorithm. START / END

Process Rectangle Internal calculations, variable assignments, data operations. Count ← Count + 1

Input / Output Parallelogram Data entering system from user or sending output to display/printer. INPUT X / OUTPUT Y

Decision Diamond Conditional test evaluated to TRUE/FALSE (Yes/No) branching paths. IF ... THEN / WHILE

Subroutine Rectangle with inner side bars Call to an external procedure or function block. CALL MyProcedure()

Line / Arrow Arrowed Line Directs sequence and flow of execution from one step to next. Flow Direction

1.5 Validation Checks & Mechanisms


Validation
Definition & Purpose Syllabus Example
Check

Range Check Ensures numerical values fall within inclusive upper and lower limits. Exam percentage: $0 \le ext{Mark} \le
100$

Length Check Ensures text/number contains exact or bounded number of characters. Password must be $\ge 8$ characters;
PIN exactly 4 digits.

Type Check Ensures input matches expected data type (INTEGER, STRING, REAL). Age field rejects non-numeric entries like
"twelve".

Presence Ensures field is not left blank before form processing. Mandatory field like Email address during
Check registration.

Format / Ensures string follows specific alphanumeric pattern/template. Postcode: LLNN NLL (2 Letters, 2
Pattern Check Numbers, Space, 1 Number, 2 Letters).

Check Digit Additional calculated digit appended to end of identification number. Detects human ISBN-13 (Books), Barcodes (EAN), Bank
entry errors like transposition (transposing adjacent digits e.g. 54 to 45) or mistyped Account Numbers.
digits.

1.6 Verification Methods


• Double Entry: Data is typed into system twice (by same or different users) and compared bit-by-bit; mismatch triggers prompt.
Example: Password creation.
• Visual Check / Proofreading: User visually compares output on screen against original physical document before committing
changes. Example: Checking typed order details against paper form.

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 1 of 8
1.7 Test Data Categories
Concrete Example ($10 \le ext{Score}
Category Exact Definition
\le 50$)

Normal Data Valid data that falls well within normal limits and should be accepted. 25, 40

Boundary Data Valid values at the absolute upper and lower boundaries of valid range; 10, 50
accepted.

Extreme Data Values at absolute maximum/minimum limits, OR values immediately outside 10, 50 (accepted boundary) or 9, 51 (first
boundary limits used to verify exact cutoff. rejected value).

Invalid / Erroneous Data outside range OR of wrong data type; must be trapped and rejected. -5, 100, "hello"
Data

1.8 Trace Tables & Finding Errors


• Purpose: Used to perform dry-runs of algorithms manually to track variable state updates and identify logic errors.
• Rules: Record variable changes on a NEW row only when value changes. Output column must store exact string output. Do not
skip loops.

2. TOPIC 8: PROGRAMMING CONCEPTS & ALGORITHMS


2.1 Data Types
• INTEGER: Whole positive or negative numbers without decimal points (e.g., -12, 0, 105).
• REAL / FLOAT: Numbers containing decimal/fractional parts (e.g., 3.14159, -0.01).
• CHAR: A single character enclosed in quotes (e.g., 'A', '9', '$').
• STRING: Sequence of zero or more characters (e.g., "Cambridge IGCSE").
• BOOLEAN: Logical binary flag holding either TRUE or FALSE.

2.2 Cambridge Pseudocode Syntax Rules & Keywords


// 1. Declarations & Constant Definition
DECLARE StudentName : STRING
DECLARE Score : INTEGER
DECLARE Average : REAL
DECLARE Passed : BOOLEAN
CONSTANT MaxMarks = 100

// 2. Variable Assignment (ALWAYS use <- arrow)


Score ← 85

// 3. Arrays (1-Based Indexing in Cambridge Pseudocode)


DECLARE Names : ARRAY[1:30] OF STRING
DECLARE Scores : ARRAY[1:30, 1:3] OF INTEGER // 2D Array

// 4. Conditional Constructs
IF Score >= 50 THEN
OUTPUT "Pass"
ELSE
OUTPUT "Fail"
ENDIF

CASE OF Choice
1 : OUTPUT "Option 1 Selected"
2 : OUTPUT "Option 2 Selected"
OTHERWISE : OUTPUT "Invalid Selection"
ENDCASE

// 5. Loop Constructs
// Count-Controlled Loop (FOR)
FOR i ← 1 TO 30
OUTPUT Names[i]
NEXT i

// Pre-Condition Loop (WHILE...DO) - Runs 0 or more times


WHILE Score < 0 OR Score > 100 DO
OUTPUT "Invalid score, re-enter:"
INPUT Score
ENDWHILE

// Post-Condition Loop (REPEAT...UNTIL) - Runs at least 1 time


REPEAT
INPUT Score
UNTIL Score >= 0 AND Score <= 100

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 2 of 8
2.3 String Handling Functions
Evaluates
Pseudocode Function Behavior / Description Example Code
To

LENGTH(String) Returns integer count of characters in string. LENGTH("Computer") 8

SUBSTRING(String, Start, Extracts sub-string starting at index Start for SUBSTRING("Science", 1, "Sci"
Length) Length chars. 3)

UPPER(String) Converts all letters in string to UPPERCASE. UPPER("igcse") "IGCSE"

LOWER(String) Converts all letters in string to lowercase. LOWER("PASS") "pass"

UCASE(Char) / LCASE(Char) Converts single character to upper/lowercase. UCASE('a') 'A'

2.4 File Handling Operations


Programs store data persistently on secondary storage using text files.
// Reading from a File line-by-line
DECLARE LineOfText : STRING
OPENFILE "[Link]" FOR READ
WHILE NOT EOF("[Link]") DO
READFILE "[Link]", LineOfText
OUTPUT LineOfText
ENDWHILE
CLOSEFILE "[Link]"

// Writing / Appending to a File


OPENFILE "[Link]" FOR WRITE // WRITE overwrites file; APPEND adds to end
WRITEFILE "[Link]", "Mufaro - 95"
CLOSEFILE "[Link]"

2.5 Subroutines: Procedures vs Functions


• Procedure: A reusable block of code that performs a task but does NOT return a value back to calling code. Called using CALL
ProcedureName(params).
• Function: A reusable block of code that processes input parameters and RETURNS a single value back to caller. Called directly
within expressions e.g. X ← CalculateScore(8, 10).
• Parameters: Variables passed into subroutines (By Value or By Reference).
• Scope: Local variables exist only within subroutine; Global variables accessible everywhere.

// Procedure Example
PROCEDURE DisplayHeader(Title : STRING)
OUTPUT "================================="
OUTPUT Title
OUTPUT "================================="
ENDPROCEDURE

// Function Example
FUNCTION CalculateAverage(Sum : INTEGER, Count : INTEGER) RETURNS REAL
IF Count = 0 THEN
RETURN 0.0
ELSE
RETURN Sum / Count
ENDIF
ENDFUNCTION

2.6 Array Manipulation (1D & 2D Arrays)


• 1D Array: Linear list of elements of same data type accessed by single index e.g., Marks[5].
• 2D Array: Grid structure containing rows and columns accessed by two indices e.g., Grid[Row, Column].

// Initializing 2D Array (5 Rows, 3 Columns)


DECLARE Matrix : ARRAY[1:5, 1:3] OF INTEGER
DECLARE r, c : INTEGER

FOR r ← 1 TO 5
FOR c ← 1 TO 3
Matrix[r, c] ← 0
NEXT c
NEXT r

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 3 of 8
2.7 All Core Syllabus Standard Algorithms

Algorithm 1: Input Validation Loop

OUTPUT "Enter student mark (0-100):"


INPUT Mark
WHILE Mark < 0 OR Mark > 100 DO
OUTPUT "Invalid entry! Re-enter mark (0-100):"
INPUT Mark
ENDWHILE

Algorithm 2: Totalling, Averaging, Highest & Lowest

DECLARE Total, Mark, High, Low, i : INTEGER


DECLARE Avg : REAL
Total ← 0
High ← -1
Low ← 999

FOR i ← 1 TO 30
OUTPUT "Enter score for student ", i
INPUT Mark
WHILE Mark < 0 OR Mark > 100 DO
INPUT Mark
ENDWHILE

Total ← Total + Mark

IF Mark > High THEN


High ← Mark
ENDIF
IF Mark < Low THEN
Low ← Mark
ENDIF
NEXT i

Avg ← Total / 30
OUTPUT "Total: ", Total, " Average: ", Avg, " Max: ", High, " Min: ", Low

Algorithm 3: Linear Search (1D Array)

DECLARE SearchTarget, Index : INTEGER


DECLARE Found : BOOLEAN

Found ← FALSE
Index ← 1

OUTPUT "Enter ID to search: "


INPUT SearchTarget

WHILE Index <= 100 AND Found = FALSE DO


IF IDArray[Index] = SearchTarget THEN
Found ← TRUE
ELSE
Index ← Index + 1
ENDIF
ENDWHILE

IF Found = TRUE THEN


OUTPUT "Target found at array index: ", Index
ELSE
OUTPUT "Target not found in array."
ENDIF

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 4 of 8
Algorithm 4: Bubble Sort (Ascending Order)

DECLARE Temp, i, Top : INTEGER


DECLARE Swapped : BOOLEAN

Top ← 10 // Array Size


REPEAT
Swapped ← FALSE
FOR i ← 1 TO Top - 1
IF NumberList[i] > NumberList[i + 1] THEN
// Swap elements
Temp ← NumberList[i]
NumberList[i] ← NumberList[i + 1]
NumberList[i + 1] ← Temp
Swapped ← TRUE
ENDIF
NEXT i
Top ← Top - 1 // Optimization step
UNTIL Swapped = FALSE

3. EXAM SECTION 2: 15-MARK SCENARIO QUESTION STRATEGY

The 15-Mark Bulletproof Blueprint


1. 1. Declarations & Initializations: Declare all counters, arrays, accumulators, flags. Initialize totals to 0, highest to -1, lowest to
high value (999).
2. 2. Main Processing Loop: Use FOR i ← 1 TO N for fixed iterations, or WHILE Flag = FALSE for variable inputs.
3. 3. Input & Validation: Trap EVERY user entry immediately using a WHILE validation loop checking lower and upper bounds.
4. 4. Accumulation & Threshold Checks: Add values to running total, update pass/fail counters using IF...THEN.
5. 5. Tracking Max/Min Records: Compare current value to Highest; update Highest and parallel array / name variable if
exceeded.
6. 6. Post-Loop Output: Calculate averages (guard against division by zero!), output summary headings, pass totals, and
percentages outside the loop.

Complete Master 15-Mark Solution (Full Exam Exemplar)


Scenario: A robotics club tracks test scores for 30 robots tested across 3 challenge courses (Course 1, Course 2, Course 3). Max score
per course is 50. Write an algorithm in pseudocode that: 1. Prompts and inputs Robot ID and scores for all 3 courses. 2. Validates that
each course score is between 0 and 50 inclusive. 3. Calculates total score for each robot and displays ID, Total, and Outcome
("QUALIFIED" if total $\ge 100$, else "DISQUALIFIED"). 4. Keeps track of overall top robot ID, total qualified count, and class average
total score.

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 5 of 8
// 1. DECLARATIONS
DECLARE RobotID : STRING
DECLARE C1, C2, C3, RobotTotal, GroupTotal : INTEGER
DECLARE QualifiedCount, i : INTEGER
DECLARE GroupAverage, QualPercentage : REAL
DECLARE TopScore : INTEGER
DECLARE TopID : STRING

// 2. INITIALIZATIONS
GroupTotal ← 0
QualifiedCount ← 0
TopScore ← -1
TopID ← ""

// 3. MAIN PROCESSING LOOP


FOR i ← 1 TO 30
OUTPUT "Enter Robot ID: "
INPUT RobotID

// Validate Course 1 Score


OUTPUT "Enter Course 1 score (0-50): "
INPUT C1
WHILE C1 < 0 OR C1 > 50 DO
OUTPUT "Invalid score! Re-enter Course 1 score (0-50): "
INPUT C1
ENDWHILE

// Validate Course 2 Score


OUTPUT "Enter Course 2 score (0-50): "
INPUT C2
WHILE C2 < 0 OR C2 > 50 DO
OUTPUT "Invalid score! Re-enter Course 2 score (0-50): "
INPUT C2
ENDWHILE

// Validate Course 3 Score


OUTPUT "Enter Course 3 score (0-50): "
INPUT C3
WHILE C3 < 0 OR C3 > 50 DO
OUTPUT "Invalid score! Re-enter Course 3 score (0-50): "
INPUT C3
ENDWHILE

// Individual Calculations & Updates


RobotTotal ← C1 + C2 + C3
GroupTotal ← GroupTotal + RobotTotal

IF RobotTotal >= 100 THEN


OUTPUT "Robot ID: ", RobotID, " | Total: ", RobotTotal, " | Outcome: QUALIFIED"
QualifiedCount ← QualifiedCount + 1
ELSE
OUTPUT "Robot ID: ", RobotID, " | Total: ", RobotTotal, " | Outcome: DISQUALIFIED"
ENDIF

// Track Top Performing Robot


IF RobotTotal > TopScore THEN
TopScore ← RobotTotal
TopID ← RobotID
ENDIF
NEXT i

// 4. SUMMARY CALCULATIONS & FINAL OUTPUTS


GroupAverage ← GroupTotal / 30
QualPercentage ← (QualifiedCount / 30) * 100

OUTPUT "================ COMPETITION SUMMARY ================"


OUTPUT "Average Group Score: ", GroupAverage
OUTPUT "Total Robots Qualified: ", QualifiedCount
OUTPUT "Qualification Percentage: ", QualPercentage, "%"
OUTPUT "Top Performing Robot: ID ", TopID, " with Total Score ", TopScore

4. TOPIC 9: DATABASES & SQL


4.1 Relational Database Fundamentals
• Table (Relation): Structured collection of data organized into rows and columns.
• Record (Row / Tuple): A single complete set of related data fields representing one real-world entity instance.
• Field (Column / Attribute): A single specific category of information within a record.
• Primary Key: A field containing unique values that uniquely identifies every record in a table.
• Foreign Key: A primary key from one table included in another table to create a relationship between tables.

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 6 of 8
• Data Types in Databases: Text/VARCHAR, Integer, Decimal/Currency, Boolean/Yes-No, Date/Time.

4.2 Complete SQL Syntax Guide


SELECT Field1, Field2, Field3
FROM TableName
WHERE Condition1 AND/OR Condition2
ORDER BY Field1 ASC|DESC;

SQL Operators & Functions Reference

• Comparison Operators: = (Equal), <> or != (Not Equal), >, <, >=, <=.
• Logical Operators: AND, OR, NOT.
• Wildcard Matching: LIKE '%pattern%' (% matches any sequence of characters; _ matches single character).
• In List Matching: WHERE Subject IN ('CS', 'Maths', 'Physics').
• Aggregate Functions: COUNT(), SUM(), AVG(), MAX(), MIN().

SQL Practice Exemplars

Example 1: List Name and Email of all members from table MEMBERS whose status is 'Active', ordered alphabetically by Name.
SELECT Name, Email
FROM MEMBERS
WHERE Status = 'Active'
ORDER BY Name ASC;

Example 2: Find the total count and average price of items in table INVENTORY where Stock $< 10$.
SELECT COUNT(ItemID), AVG(Price)
FROM INVENTORY
WHERE Stock < 10;

5. TOPIC 10: BOOLEAN LOGIC GATES & CIRCUITS


5.1 Complete Logic Gate Summary
Gate
Symbol Logic Behavior / Definition Truth Table Summary
Type

NOT $ ext{NOT } A$ Inverts input bit (Inverter). Output is opposite of input. $0 ightarrow 1, 1 ightarrow 0$

AND $A ext{ AND } B$ Output is $1$ ONLY if ALL inputs are $1$. $1 ext{ AND } 1 = 1$, all other pairs $0$

OR $A ext{ OR } B$ Output is $1$ if AT LEAST ONE input is $1$. $0 ext{ OR } 0 = 0$, all other pairs $1$

NAND $ ext{NOT}(A ext{ AND } Inverse of AND gate. Output is $0$ ONLY if ALL inputs are $1 ext{ AND } 1 = 0$, all other pairs $1$
B)$ $1$.

NOR $ ext{NOT}(A ext{ OR } B) Inverse of OR gate. Output is $1$ ONLY if ALL inputs are $0$. $0 ext{ OR } 0 = 1$, all other pairs $0$
$

XOR $A ext{ XOR } B$ Exclusive-OR. Output is $1$ if inputs are DIFFERENT from $(1,0) ightarrow 1, (0,1) ightarrow 1$,
each other. else $0$

5.2 Logic Circuit Step-by-Step Problem Solving


Problem: Construct full 8-row truth table for expression: $X = ( ext{NOT } A ext{ AND } B) ext{ OR } (B ext{ XOR } C)$

$A$ $B$ $C$ $ ext{NOT } A$ $ ext{NOT } A ext{ AND } B$ $B ext{ XOR } C$ Output $X$

0 0 0 1 0 0 0

0 0 1 1 0 1 1

0 1 0 1 1 1 1

0 1 1 1 1 0 1

1 0 0 0 0 0 0

1 0 1 0 0 1 1

1 1 0 0 0 1 1

1 1 1 0 0 0 0

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 7 of 8
6. FINAL EXAM CHECKLIST & COMMON LOSS OF MARKS
• Never Use Single Equal Signs for Assignment: Write Score ← 85, NEVER Score = 85 in pseudocode.
• Uppercase All Keywords: Write DECLARE, INPUT, OUTPUT, IF, THEN, ELSE, ENDIF, WHILE, DO, ENDWHILE, FOR, NEXT in ALL
CAPS.
• 1-Based Array Indexing: In Cambridge pseudocode, arrays run from 1 to N (e.g. ARRAY[1:30]).
• Always Nest Validation Inside Input Loops: In the 15-mark scenario, immediately follow every INPUT with a WHILE validation
check.
• Trace Table Row Precision: Fill out trace tables row-by-row strictly when a variable changes value. Write explicit output strings in
the OUTPUT column.
• SQL Sequence: Memory trick: Some Frogs Wear Overalls → SELECT → FROM → WHERE → ORDER BY.

IGCSE Computer Science (0478/2210) Paper 2 — Complete Syllabus Master Notes Page 8 of 8

You might also like