CAIE-IGCSE-Computer Science - Practical
CAIE-IGCSE-Computer Science - Practical
ORG
CAIE IGCSE
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Atharva for personal use only.
CAIE IGCSE COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Pseudocode - Verbal representation of an algorithm (a Declaration & Usage of Variables & Constants
process or set of steps) and flowcharts are a Variable – Store of data which changes during
diagrammatic representation. execution of the program (due to user input)
Flowcharts: A flowchart shows diagrammatically the Constant – Store of data that remains the same
steps required to complete a task and the order that during the execution of the program
they are to be performed Basic Data Types
Algorithm: These steps, together with the order, are Integer – Whole Number e.g. 2; 8; 100
called an algorithm Real – Decimal Number e.g. 7.00; 5.64
Char – Single Character e.g. a; Y
String – Multiple Characters (Text) e.g. ZNotes; COOL
Boolean – Only 2 Values e.g. True/False; Yes/No; 0/1
Input & Output (READ & PRINT) – Used to receive and
display data to the user respectively. (It is recommended
to use input and output commands)
INPUT Name
OUTPUT "Hello Mr." , Name
// Alternatively //
READ Name
PRINT "Hello Mr," , Name
An example of a flowchart is given below from a past paper
question in which all of the functions of a flowchart are Declaration of variable - A variable/constant can be
shown: declared by the following manner
Conditional Statements:
This flowchart’s task is to check if a rider’s height is more the IF…THEN…ELSE…ENDIF
requirement (1.2) in this case. It then counts until the
accepted riders are 8. After they are 8, it outputs the
number of rejected riders and tells the rest that they are
ready to go!
2. Pseudocode
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Loop Structures:
FOR…TO…NEXT : Will run for a determined/known
IF [BOOLEAN VARIABLE]
THEN
OUTCOME
ELSE
OUTCOME
ENDIF
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
// Average//
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Bubble Sort: Iteratively compare and swap adjacent Test data that would be rejected by the solution as not
elements in a list to sort them. Start from the first suitable, if the solution is working properly is called
element and continue until the second-to-last element. abnormal test data / erroneous test data.
After each pass, the last element is in its correct place. e.g. in a program where only whole number values
However, other elements may still be unsorted. Repeat ranging from 0 to 100 (inclusive) are accepted, abnormal
the process, excluding the last element, until only one data will be: -1, 151, 200, 67.2, “Sixty-Two” and -520
element remains or no swaps are needed.
First ← 1
3.3. Extreme Data
Last ← 10
Extreme data are the largest and smallest values that
REPEAT
normal data can take
Swap ← FALSE
FOR Index ← First TO Last - 1
e.g. in a program where only whole number values
IF Array[Index] > Array[Index + 1]
ranging from 0 to 100 (inclusive) are accepted, extreme
THEN
data will be: 0 and 100
Temp ← Array[Index]
Array[Index] ← Array[Index + 1] 3.4. Boundary Data
Array[Index + 1] ← Temp
Swap ← TRUE This is used to establish where the largest and smallest
ENDIF values occur
NEXT Index At each boundary two values are required: one value is
Last ← Last - 1 accepted and the other value is rejected.
UNTIL (NOT Swap) OR Last = 1 e.g. in a program where only whole number values
ranging from 0 to 100 (inclusive) are accepted, one
example of boundary data will be: 100 and 101. 100 will
3. Test Data be accepted and 101 will not be accepted
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Whenever a variable's value changes, the new value is Trace tables can be used to trace errors in a program.
recorded in the respective column of the trace table. For example, if the requirement for the previous
Each time a value is outputted, it is displayed in the question would be to accept riders that are of height 1.2
output column. too, rather than rejecting them, then the error would
have been caught in the trace table as when 1.2 is
An example of trace table is given below using a past paper entered, it would increment rejected which it shouldn’t in
question: our example
Q: The flowchart below inputs the height of children who
want to ride on a rollercoaster. Children under 1.2 metres
are rejected. The ride starts when eight children have been 5. How to write an algorithm?
accepted.
The ability to write an algorithm is very important for
this syllabus and paper. Some key steps/points to be
known in-order to write the perfect algorithm are as
follows:
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
To ensure the acceptance of reasonable and accurate data
inputs, computer systems must thoroughly examine each Type check
data item before accepting it, and this is where Validation
and Verification come into play! A type check verifies that the entered data corresponds to a
specific data type.
Validation
OUTPUT "Enter the value "
Validation in computer systems involves automated checks REPEAT
to ensure the reasonableness of data before accepting it. If INPUT Value
the data is invalid, the system should provide an explanatory IF Value <> DIV(Value, 1)
message for rejection and allow another chance to enter the THEN
data. OUTPUT "This must be a whole number, please re-en
\n There are many types of it. ENDIF
UNTIL Value = DIV(Value, 1)
Range check
Presence check
A range check verifies that a numerical value falls within
specified upper and lower limits. A presence check checks to ensure that some data has been
entered and the value has not been left blank
REPEAT
INPUT Value OUTPUT "Please enter the value "
IF Value < MinimumValue OR Value > MaximumValue REPEAT
THEN INPUT Value
OUTPUT "The student's mark should be in the range" IF Value = ""
ENDIF THEN
UNTIL Value >= MinimumValue AND Value <= MaximumValu OUTPUT "*=Required "
ENDIF
Length check UNTIL Value <> ""
This can either ensure that data consists of a precise Format Check
number of characters.
A format check checks that the characters entered conform
OUTPUT "Please enter your value of ", Limit , " cha to a pre-defined pattern.
REPEAT
INPUT Value Check Digit
IF LENGTH(Value) <> Limit
THEN A check digit is the final digit included in a code; it is
OUTPUT "Your value must be exactly" , Limit ," cha calculated from all the other digits.
ENDIF Check digits are used for barcodes, product codes,
UNTIL LENGTH(Value) = Limit International Standard Book Numbers (ISBN), and
Vehicle Identification Numbers (VIN).
It can also check if the data entered is a reasonable number
of characters or not Verification
OUTPUT "Please enter your value " Verification is checking that data has been accurately copied
REPEAT from one source to another
INPUT Value There are 2 methods to verify data during entry ( there
IF LENGTH(Value) > UpperLimit OR LENGTH(Value) < Lo are other methods during data transfer, but they are in
THEN paper 1)
OUTPUT "Too short or too long, please re-enter "
ENDIF 1. Double Entry
UNTIL LENGTH(Value) <= UpperLimit AND LENGTH(Value)
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Data is inputted twice, potentially by different operators. Different data types are assigned to computer systems
The computer system compares both entries and if they for effective processing and storage.
differ, an error message is displayed, prompting the data Data types allow data, such as numbers or characters, to
to be reentered. be stored appropriately.
Data types enable effective manipulation using
2. Screen/Visual check mathematical operators for numbers and character
concatenation.
A screen/visual check involves the user manually Some data types provide automatic validation.
reviewing the entered data. The types of datatypes are told in Chapter 1 already!
After data entry, the system displays the data on the
screen and prompts the user to confirm its accuracy Input and Output
before proceeding.
The user can compare the displayed data against a paper Programs require input and output statements to handle
document used as an input form or rely on their own data.
knowledge to verify correctness. In IGCSE Computer Science, algorithms and programs
are designed to take input from a keyboard and output
5.2. Programming Concepts to a screen.
Prompting the user with clear instructions for input is
Constructs of a Program necessary for the user to understand what is expected.
Input data in programming languages must match the
Data use – variables, constants and arrays required data type of the variable where it will be stored.
Sequence – order of steps in a task By default, inputs are treated as strings, but commands
Selection – choosing a path through a program can convert input to integer or real number data types.
Iteration – repetition of a sequence of steps in a program Users should be provided with information about the
Operators use arithmetic for calculations and logic and output/results for a program to be useful.
Boolean for decisions. Each output should be accompanied by a message
explaining the result's meaning or significance.
Variables and Constants If an output statement has multiple parts, they can be
separated by a separator character.
A variable within a computer program refers to a named
storage unit with a value that can be modified
throughout the program's execution. To enhance 6. File Handling
comprehension for others, it is advisable to assign
significant names to variables. Computer programs store data that will be needed again
A constant within a computer program represents a in a file.
named storage unit that holds a value which remains Data stored in RAM is volatile and will be lost when the
unchanged throughout the program's execution. Similar computer is powered off.
to variables, it is recommended to assign meaningful Data saved to a file is stored permanently, allowing it to
names to constants to enhance comprehensibility for be accessed by the same program at a later date or by
others. other programs.
Stored data in a file can be transferred and used on
Data Types other computers.
The storage of data in files is a commonly used feature in
programming.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Key point: When writing in a file, the program is
outputing the data to the file, and when reading a file, Programming language development systems often
the program in inputing the data from the file provide library routines that can be readily incorporated
\n There are 3 ways a file can be opened in a program i.e. to into programs.
write, to read and to append Library routines are pre-tested and ready for use, making
programming tasks easier.
Integrated Development Environments (IDEs) typically
6.1. Writing in a file include a standard library of functions and procedures.
Standard library routines perform various tasks,
OPENFILE "filename.txt" FOR WRITE
including string handling.
MOD – returns the remainder of a division
//When opening a file to write, all the data already
DIV – returns the quotient (i.e. the whole number part) of
a division
ROUND – returns a value rounded to a given number of
WRITEFILE "filename.txt" , Value
decimal places
RANDOM – returns a random number.
// The next command of WRITEFILE would be writen on
Examples:
CLOSEFILE "filename.txt"
Value1 <--- MOD(10,3) returns the remainder of 10
divided by 3
6.2. Reading a file: Value2 <---- DIV(10,3) returns the quotient of 10 divided
OPENFILE "filename.txt" FOR READ
by 3
READFILE "filename.txt" , Variable Value3 <--- ROUND(6.97354, 2) returns the value
// The value in the line (which is identified by the
rounded to 2 decimal places
CLOSEFILE "filename.txt"
Value4 <--- RANDOM() returns a random number
between 0 and 1 inclusive
""
This method can also be used to comment
multiple lines but the singular line method
is more widely accepted and reccomended too
""
7. Programming
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
LCASE("Text Here")
Selection
Selection is a very useful technique, allowing different routes LCASE(Variable)
through the steps of a program. The code of this is explained
in the notes of previous chapters. Arithmetic, Logical and Boolean Operators
String Handling
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Selection and iteration statements can be nested, When defining procedures and functions, the header is
meaning one statement can be placed inside another. the first statement in the definition.
Nested statements help reduce code duplication and The header includes:
simplify testing of programs. The name of the procedure or function.
Different types of constructs can be nested within each Parameters passed to the procedure or function,
other, such as selection statements within condition- along with their data types.
controlled loops or loops within other loops. The data type of the return value for a function.
Procedure calls are standalone statements.
Procedures and Functions Function calls are made as part of an expression,
typically on the right-hand side.
A procedure refers to a collection of programming
statements organized under a single name, invoked at Local and Global Variable
any given point in a program to execute a specific task.
A function is a compilation of programming statements Any part of a program can use a global variable – its
consolidated under a singular name, invoked at any scope covers the whole program
moment within a program to accomplish a particular A local variable can only be used by the part of the
task. Unlike a procedure, a function also has the program it is declared in – its scope is restricted to that
capability to return a value back to the main program. part of the program.
Parameters refer to variables that store the values of
arguments passed to a procedure or function. While not Note: Any variables/arrays made in this procedure and
all procedures and functions require parameters, some functions will be local and cannot be used out of these.
utilize them to facilitate their operations. To be made available all over the program, they must be
declared globally in the following way.
Procedures without parameters:
DECLARE [VariableName] : DataType AS GLOBAL
PROCEDURE ProcedureName ()
[Commands] 7.3. Arrays
ENDPROCEDURE
//Calling/running the procedure An array is a data structure containing several elements
CALL ProcedureName() of the same data type; these elements can be accessed
The procedure with parameters: using the same identifier name.
The position of each element in an array is identified
PROCEDURE ProcedureName (ParameterName : ParameterDa using the array’s index.
[Commands] There are two types of arrays
ENDPROCEDURE
//Calling/running the procedure One-Dimensional Array
CALL ProcedureName (ParameterValue)
Explained in the previous chapter in detail
Function:
Two-Dimensional Array
FUNCTION FunctionName (ParameterName : ParameterData
[Commands]
RETURN ValueToBeReturned
ENDFUNCTION
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
A Output
A two-dimensional array can be referred to as a table 0 1
with rows and columns.
1 0
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
A B Output
0 0 0
0 1 1
1 0 1
1 1 0
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
The circuit:
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
SELECT (fieldsname)
FROM (tablesname)
WHERE (condition)
ORDER BY (sortingcondition) ;
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2024. All rights reserved.
This version was created by Atharva on Fri Jan 10 2025 for strictly personal use only.
These notes have been created by Abdullah Aamir, Abhiram Mydi and Shriram Srinivas for the 2023-2025 syllabus.
The document contains images and excerpts of text from educational resources available on the internet and printed books.
If you are the owner of such media, test or visual, utilized in this document and do not accept its usage then we urge you to contact us
and we would immediately replace said media. No part of this document may be copied or re-uploaded to another website.
Under no conditions may this document be distributed under the name of false author(s) or sold for financial gain.
"ZNotes" and the ZNotes logo are trademarks of ZNotes Education Limited (registration UK00003478331).