CAIE IGCSE Computer Science Practical
CAIE IGCSE Computer Science Practical
ORG
CAIE IGCSE
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Saung Hnin for personal use only.
CAIE IGCSE COMPUTER SCIENCE
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/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
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
Loop Structures:
FOR…TO…NEXT : Will run for a determined/known
IF [BOOLEAN VARIABLE]
THEN
OUTCOME
ELSE
OUTCOME
ENDIF
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
// Average//
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/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
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
Validation in computer systems involves automated checks
to ensure the reasonableness of data before accepting it. If OUTPUT "Enter the value "
the data is invalid, the system should provide an explanatory REPEAT
message for rejection and allow another chance to enter the INPUT Value
data. IF Value <> DIV(Value, 1)
There are multiple types of validation. These include: THEN
Range check OUTPUT "This must be a whole number, please re-en
A range check verifies that a numerical value falls within ENDIF
specified upper and lower limits. UNTIL Value = DIV(Value, 1)
2. Screen/Visual check
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
A screen/visual check involves the user manually Programs require input and output statements to handle
reviewing the entered data. data.
After data entry, the system displays the data on the In IGCSE Computer Science, algorithms and programs
screen and prompts the user to confirm its accuracy are designed to take input from a keyboard and output
before proceeding. to a screen.
The user can compare the displayed data against a paper Prompting the user with clear instructions for input is
document used as an input form or rely on their own necessary for the user to understand what is expected.
knowledge to verify correctness. Input data in programming languages must match the
required data type of the variable where it will be stored.
5.2. Programming Concepts By default, inputs are treated as strings, but commands
can convert input to integer or real number data types.
Constructs of a Program Users should be provided with information about the
output/results for a program to be useful.
Data use – variables, constants and arrays Each output should be accompanied by a message
Sequence – order of steps in a task explaining the result's meaning or significance.
Selection – choosing a path through a program If an output statement has multiple parts, they can be
Iteration – repetition of a sequence of steps in a program separated by a separator character.
Operators use arithmetic for calculations and logic and
Boolean for decisions. 6. File Handling
Variables and Constants
Computer programs store data that will be needed again
A variable within a computer program refers to a named in a file.
storage unit with a value that can be modified Data stored in RAM is volatile and will be lost when the
throughout the program's execution. To enhance computer is powered off.
comprehension for others, it is advisable to assign Data saved to a file is stored permanently, allowing it to
significant names to variables. be accessed by the same program at a later date or by
A constant within a computer program represents a other programs.
named storage unit that holds a value which remains Stored data in a file can be transferred and used on
unchanged throughout the program's execution. Similar other computers.
to variables, it is recommended to assign meaningful The storage of data in files is a commonly used feature in
names to constants to enhance comprehensibility for programming.
others.
Key point: When writing in a file, the program is
outputing the data to the file, and when reading a file,
Data Types
the program in inputing the data from the file
Different data types are assigned to computer systems \n There are 3 ways a file can be opened in a program i.e. to
for effective processing and storage. write, to read and to append
Data types allow data, such as numbers or characters, to
be stored appropriately. 6.1. Writing in a file
Data types enable effective manipulation using
mathematical operators for numbers and character
concatenation.
Some data types provide automatic validation.
The types of datatypes are told in Chapter 1 already!
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
OPENFILE "[Link]" FOR WRITE Value1 <--- MOD(10,3) returns the remainder of 10
divided by 3
//When opening a file to write, all the data already Value2 <---- DIV(10,3) returns the quotient of 10 divided
by 3
Value3 <--- ROUND(6.97354, 2) returns the value
WRITEFILE "[Link]" , Value rounded to 2 decimal places
Value4 <--- RANDOM() returns a random number
// The next command of WRITEFILE would be writen on between 0 and 1 inclusive
OPENFILE "[Link]" FOR READ always use meaningful identifier names for variables,
READFILE "[Link]" , Variable constants, arrays, procedures and functions
// The value in the line (which is identified by the be divided into modules for each task using procedures
CLOSEFILE "[Link]" and functions
be fully commented using your programming language’s
commenting feature
6.3. Reading a file till EOF:
Commenting in pseudocode:
OPENFILE "[Link]" FOR READ
DECLARE DataVariable : STRING // Now the text written is commented and thus ignore
WHILE NOT EOF("[Link]) DO
READFILE "[Link]", DataVariable ""
// here the line can be outputted or stored in an a This method can also be used to comment
//before the file ends has been read multiple lines but the singular line method
ENDWHILE is more widely accepted and reccomended too
""
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
Python is an open-source, versatile programming Strings are used to store text and can contain various
language that encourages quick program development characters.
and emphasises code readability. The integrated An empty string has no characters, while the
development environment (IDE) showcased in this programming language specifies the maximum number
chapter is referred to as IDLE. of characters allowed.
Visual Basic is a popular programming language that is Characters in a string can be identified by their position
extensively used for Windows development. The number, starting from either zero or one, depending on
integrated development environment (IDE) featured in the programming language.
this chapter is known as Visual Studio, which is utilised String handling is an important aspect of programming.
for capturing screenshots. In IGCSE Computer Science, you will need to write
Java is a widely adopted programming language utilised algorithms and programs for the following string
by numerous developers. The integrated development methods:
environment (IDE) employed for capturing screenshots in Length: Determines the number of characters in a
this chapter is known as BlueJ. string, including spaces.
Substring: Extracts a portion of a string.
7.2. Basic Concepts Upper: Converts all letters in a string to uppercase.
Lower: Converts all letters in a string to lowercase.
When writing the steps required to solve a problem, the These string manipulation methods are commonly
following concepts need to be used and understood: provided in programming languages through library
routines.
Sequence
Selection Finding the length of a string:
Iteration LENGTH("Text Here")
Counting and totalling
String handling LENGTH(Variable)
Use of operators.
Extracting a substring from a string:
Sequence
SUBSTRING("Computer Science", 10, 7)
The ordering of the steps in an algorithm is very important. // returns the next 7 values starting from the 10th
An incorrect order can lead to incorrect results and/or extra SUBSTRING(Variable, Position, Length)
steps that are not required by the task.
Converting a string to upper case
Selection
UCASE("Text here")
Selection is a very useful technique, allowing different routes
UCASE(Variable)
through the steps of a program. The code of this is explained
in the notes of previous chapters. Converting a string to lowercase
Iteration LCASE("Text Here")
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/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
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
OR gate: A + B
When a two-dimensional array is declared in
pseudocode, the first and last index values for rows and A
0
B
0
Output
0
the first and last index values for columns alongside the 0 1 1
data type are included. 1
1
0
1
1
1
Declaring a 2D Array:
NOT Gate
AND Gate
OR Gate
NAND Gate
NOR Gate XOR gate: A ⨁ B
XOR Gate
A B Output
0 0 0
NOT gate: an inverter, A 0 1 1
1 0 1
1 1 0
A Output
0 1
1 0
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
A database is a well-organized compilation of data that
enables individuals to retrieve information according to their
specific requirements. The data contained within a database
can encompass various forms such as text, numerical
values, images, or any other type of digital content that can
be stored on a computer system.
13. Databases
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
Source: Cambridge IGCSE and O Level Computer Science by
Hodder Education Structured Query Language (SQL) is the standard
language for writing scripts to retrieve valuable
information from databases.
13.3. Validation in databases By using SQL, we can learn how to retrieve and display
specific information needed from a database.
Database management software automatically provides
For instance, someone visiting a patient may only require
some validation checks, while others need to be set up the ward number and bed number to locate them in the
by the developer during construction. hospital, while a consultant may need a list of the names
For example; The software automatically validates fields of all the patients under their care. This can be done
like "DateOfAdmission" in the PATIENT table to ensure
using SQL
data input is a valid date. \n
SQL Scripts
13.4. Basic Data Types
An SQL script is a collection of SQL commands that are
Each field will require a data type to be selected. A data type used to perform a specific task, often stored in a file for
classifies how the data is stored, displayed and the reusability.
operations that can be performed on the stored value. To comprehend SQL and interpret the output of an SQL
The datatypes for database are quite similar to original script, practical experience in writing SQL scripts is
datatypes, however, there are a few differences. necessary.
Select Statements:
SELECT (fieldsname)
FROM (tablesname)
WHERE (condition)
ORDER BY (sortingcondition) ;
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE COMPUTER SCIENCE
13.7. Operators
Just like pseudocode, the operators used there can also be
used here for conditions, however, a few more are also used
in databases
[Link] Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Saung Hnin at Mla International School on 26/03/25.
CAIE IGCSE
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2025. All rights reserved.
This version was created by Saung Hnin on Wed Mar 26 2025 for strictly personal use only.
These notes have been created by Maimoona Junjunia 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).