CAIE IGCSE Computer Science Practical
CAIE IGCSE Computer Science Practical
ORG
CAIE IGCSE
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Abdullah 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 Abdullah at Levels School Of Cambridge on 08/02/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 Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
Loop Structures:
FOR…TO…NEXT : Will run for a determined/kn
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 Abdullah at Levels School Of Cambridge on 08/02/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 Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
Presence check
A presence check checks to ensure that some data has been
entered and the value has not been left blank
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
OUTPUT "Please enter the value " Test data refers to input values used to evaluate and
REPEAT assess the functionality and performance of a computer
INPUT Value program or system.
IF Value = "" It helps identify errors and assess how the program
THEN handles different scenarios
OUTPUT "*=Required "
ENDIF 3.1. Normal Data
UNTIL Value <> ""
Normal data is the test data which accepts values in
Format Check acceptible range of values of the program
Normal data should be used to work through the
A format check checks that the characters entered conform solution to find the actual result(s) and see if they are the
to a pre-defined pattern.
same as the expected result(s)
Check Digit e.g. in a program where only whole number values
ranging from 0 to 100 (inclusive) are accepted, normal
A check digit is the final digit included in a code; it is test data will be : 23, 54, 64 , 2 and 100
calculated from all the other digits.
Check digits are used for barcodes, product codes, 3.2. Abnormal Data
International Standard Book Numbers (ISBN), and
Vehicle Identification Numbers (VIN). Test data that would be rejected by the solution as not
suitable, if the solution is working properly is called
Verification abnormal test data / erroneous test data.
e.g. in a program where only whole number values
Verification is checking that data has been accurately copied ranging from 0 to 100 (inclusive) are accepted, abnormal
from one source to another data will be: -1, 151, 200, 67.2, “Sixty-Two” and -520
There are 2 methods to verify data during entry ( there
are other methods during data transfer, but they are in 3.3. Extreme Data
paper 1)
Extreme data are the largest and smallest values that
1. Double Entry normal data can take
e.g. in a program where only whole number values
Data is inputted twice, potentially by different operators.
ranging from 0 to 100 (inclusive) are accepted, extreme
The computer system compares both entries and if they
data will be: 0 and 100
differ, an error message is displayed, prompting the data
to be reentered.
3.4. Boundary Data
2. Screen/Visual check
This is used to establish where the largest and smallest
A screen/visual check involves the user manually values occur
reviewing the entered data. At each boundary two values are required: one value is
After data entry, the system displays the data on the accepted and the other value is rejected.
screen and prompts the user to confirm its accuracy e.g. in a program where only whole number values
before proceeding. ranging from 0 to 100 (inclusive) are accepted, one
The user can compare the displayed data against a paper example of boundary data will be: 100 and 101. 100 will
document used as an input form or rely on their own be accepted and 101 will not be accepted
knowledge to verify correctness.
4. Trace Table
3. Test Data
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
| Riders | Reject | Height | OUTPUT | |----|----|----|----| | 0 |
A trace table is utilized to document the outcomes of 0 | | | | 1 | | 1.4 | | | 2 | | 1.3 | | | | 1 | 1.1 | | | 3 | | 1.3
every step in an algorithm. It is employed to record the | | | | 2 | 1.0 | | | 4 | | 1.5 | | | | 3 | 1.2 | | | 5 | | 1.3 | |
variable's value each time it undergoes a change. | 6 | | 1.4 | | | 7 | | 1.3 | | | | 4 | 0.9 | | | 8 | | 1.5 | Ready
A dry run refers to the manual process of systematically to go 4 |
executing an algorithm by following each step in
sequence.
A trace table is set up with a column for each variable 4.1. Identifying errors:
and a column for any output e.g.
Trace tables can be used to trace errors in a program.
For example, if the requirement for the previous
question would be to accept riders that are of height 1.2
too, rather than rejecting them, then the error would
have been caught in the trace table as when 1.2 is
entered, it would increment rejected which it shouldn’t in
our example
Complete the trace table for the input data: 1.4, 1.3, 1.1, 1.3,
1.0, 1.5, 1.2, 1.3, 1.4, 1.3, 0.9, 1.5, 1.6, 1.0
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
1. Make sure that the problem is clearly understood Python is an open-source, versatile programming
which includes knowing the purpose of the algorithm language that encourages quick program development
and the tasks to be completed by the algorithm. and emphasises code readability. The integrated
2. Break the problem into smaller problems (e.g. in a development environment (IDE) showcased in this
program which outputs average values, divide the chapter is referred to as IDLE.
problem into multiple ones i.e. how to count the Visual Basic is a popular programming language that is
number of iterations and how to count the total of all extensively used for Windows development. The
values) integrated development environment (IDE) featured in
3. Identify the data that is needed to be saved into this chapter is known as Visual Studio, which is utilised
variables/constants/arrays and what datatype it is, for capturing screenshots.
and declare all the variables/constants/arrays Java is a widely adopted programming language utilised
accordingly, with meaningfull names by numerous developers. The integrated development
4. Decide on how you are going to construct your environment (IDE) employed for capturing screenshots in
algorithm, either using a flowchart or pseudocode. If this chapter is known as BlueJ.
you are told how to construct your algorithm, then
follow the guidance. 6.2. Programming Concepts
5. Construct your algorithm, making sure that it can be
easily read and understood by someone else. Take Constructs of a Program
particular care with syntax e.g. when conditions are
used for loops and selection. Data use – variables, constants and arrays
6. Use several sets of test data (Normal, Abnormal and Sequence – order of steps in a task
Boundary) to dry run your algorithm and check if the Selection – choosing a path through a program
expected results are achieved (a trace table can be Iteration – repetition of a sequence of steps in a program
used for this purpose) . If error is found, find the Operators use arithmetic for calculations and logic and
point of error in the trace table and fix it in the code. Boolean for decisions.
Note: The algorithms that you have looked at so far in these Variables and Constants
notes were not designed with readability in mind because
you needed to work out what the problem being solved was. A variable within a computer program refers to a named
storage unit with a value that can be modified
6. Programming throughout the program's execution. To enhance
comprehension for others, it is advisable to assign
significant names to variables.
6.1. Programming Languages A constant within a computer program represents a
named storage unit that holds a value which remains
~~There are many high-level programming languages to unchanged throughout the program's execution. Similar
choose from. We will only be treating Python, Visual to variables, it is recommended to assign meaningful
Basic, or Java.~~ names to constants to enhance comprehensibility for
others.
Data Types
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
Selection is a very useful technique, allowing different routes
Different data types are assigned to computer systems through the steps of a program. The code of this is explained
for effective processing and storage. in the notes of previous chapters.
Data types allow data, such as numbers or characters, to
be stored appropriately. Iteration
Data types enable effective manipulation using
mathematical operators for numbers and character As explained in the previous chapter, we already
concatenation.
Some data types provide automatic validation. Totalling and Counting
The types of datatypes are told in Chapter 1 already!
As explained in the previous chapter, we already
Input and Output
String Handling
Programs require input and output statements to handle
data. Strings are used to store text and can contain various
In IGCSE Computer Science, algorithms and programs characters.
are designed to take input from a keyboard and output An empty string has no characters, while the
to a screen. programming language specifies the maximum number
Prompting the user with clear instructions for input is of characters allowed.
necessary for the user to understand what is expected. Characters in a string can be identified by their position
Input data in programming languages must match the number, starting from either zero or one, depending on
required data type of the variable where it will be stored. the programming language.
By default, inputs are treated as strings, but commands String handling is an important aspect of programming.
can convert input to integer or real number data types. In IGCSE Computer Science, you will need to write
Users should be provided with information about the algorithms and programs for the following string
output/results for a program to be useful. methods:
Each output should be accompanied by a message Length: Determines the number of characters in a
explaining the result's meaning or significance. string, including spaces.
If an output statement has multiple parts, they can be Substring: Extracts a portion of a string.
separated by a separator character. Upper: Converts all letters in a string to uppercase.
Lower: Converts all letters in a string to lowercase.
6.3. Basic Concepts These string manipulation methods are commonly
provided in programming languages through library
When writing the steps required to solve a problem, the routines.
following concepts need to be used and understood: Finding the length of a string:
Sequence LENGTH("Text Here")
Selection
Iteration LENGTH(Variable)
Counting and totalling
String handling Extracting a substring from a string:
Use of operators.
SUBSTRING("Computer Science", 10, 7)
Sequence // returns the next 7 values starting from the 1
SUBSTRING(Variable, Position, Length)
The ordering of the steps in an algorithm is very important.
An incorrect order can lead to incorrect results and/or extra Converting a string to upper case
steps that are not required by the task. UCASE("Text here")
Selection UCASE(Variable)
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/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 Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
Value1 <--- MOD(10,3) returns the remainder of 10 A two-dimensional array can be referred to as a table
divided by 3 with rows and columns.
Value2 <---- DIV(10,3) returns the quotient of 10 divided
by 3
Value3 <--- ROUND(6.97354, 2) returns the value
rounded to 2 decimal places
Value4 <--- RANDOM() returns a random number
between 0 and 1 inclusive
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/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, To store data about people, things, and events.
the program in inputing the data from the file Any modifications or additions need to be made only
\n There are 3 ways a file can be opened in a program i.e. to once, ensuring data consistency.
write, to read and to append All users access and utilize the same set of data,
promoting uniformity.
Relational databases store data in a non-repetitive
7.1. Writing in a file manner, eliminating duplication.
OPENFILE "filename.txt" FOR WRITE
8.2. What makes a database?
//When opening a file to write, all the data al
Data is stored in tables in databases. Each table consists
of a specific type of data e.g. cars. These tables HAVE to
WRITEFILE "filename.txt" , Value be named according to what they contain e.g. a table
containing patient information will be PATIENT
// The next command of WRITEFILE would be writen These tables consist of records (rows). Each record
consists of data about a single entity (a single item,
CLOSEFILE "filename.txt" person or event ) e.g. a single car
These tables also have columns that are knows an fields.
These consist of specific information regarding the
7.2. Reading a file: entities that are written later in records e.g. car name,
car manufacturer etc.
OPENFILE "filename.txt" FOR READ
READFILE "filename.txt" , Variable Note: In this chapter, skills of dealing with a database
// The value in the line (which is identified by are also required so working with Microsoft Access is
CLOSEFILE "filename.txt" needed to understand this chapter better. You have to be
able to define a single-table database from given data
7.3. Reading a file till EOF: storage requirements, choose a suitable primary key for a
database table and also be able to read, complete and
OPENFILE "filename.txt" FOR READ understand SQL scripts.
DECLARE DataVariable : STRING
WHILE NOT EOF("filename.txt) DO
READFILE "filename.txt", DataVariable
// here the line can be outputted or stored in
//before the file ends has been read
ENDWHILE
8. Databases
Source: Cambridge IGCSE and O Level Computer Science by
A database is a well-organized compilation of data that Hodder Education
enables individuals to retrieve information according to their
specific requirements. The data contained within a database 8.3. Validation in databases
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.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
Database management software automatically provides Structured Query Language (SQL) is the standard
some validation checks, while others need to be set up language for writing scripts to retrieve valuable
by the developer during construction. information from databases.
For example; The software automatically validates fields By using SQL, we can learn how to retrieve and display
like "DateOfAdmission" in the PATIENT table to ensure specific information needed from a database.
data input is a valid date. \n For instance, someone visiting a patient may only require
the ward number and bed number to locate them in the
8.4. Basic Data Types hospital, while a consultant may need a list of the names
of all the patients under their care. This can be done
Each field will require a data type to be selected. A data type using SQL
classifies how the data is stored, displayed and the
operations that can be performed on the stored value. SQL Scripts
The datatypes for database are quite similar to original
An SQL script is a collection of SQL commands that are
datatypes, however, there are a few differences.
used to perform a specific task, often stored in a file for
reusability.
To comprehend SQL and interpret the output of an SQL
script, practical experience in writing SQL scripts is
necessary.
Select Statements:
SELECT (fieldsname)
Note: Access datatype refers to the software Microsoft FROM (tablesname)
Access which is a DBMS (DataBase Management WHERE (condition)
System). Here, databases could be worked upon in ORDER BY (sortingcondition) ;
practical form
Selecting Sum of values in a table:
8.5. Primary Key SELECT SUM ( fieldsname )
FROM (tablesname)
Each record in a table represents a unique item, person, WHERE (condition)
or event. ORDER BY (sortingcondition) ;
To ensure reliable identification of these items, a field
called the primary key is necessary. Counting the number of records where the field
The primary key is a unique field that distinguishes each matches a specified condition
item within the data.
In order to serve as a primary key, a field must have SELECT COUNT ( fieldsname )
values that are never repeated within the table. FROM (tablesname)
An existing field can serve as a primary key if it is unique, WHERE (condition)
such as the ISBN in the book table. ORDER BY (sortingcondition) ;
In cases where all existing fields may contain repeated
==ORDER BY Field1, Field2, etc. – this specifies a sort in
data, an additional field, such as "HospitalNumber," can
ascending or alphabetical order starting with the first
be added to each record to serve as the primary key. field.==
==ORDER BY Field1, Field2 DESC – this specifies a sort in
8.6. Structured Query Language - SQL descending or reverse alphabetical order starting with the
first field.==
Note: ORDER BY is not necessary to add. It has to be only
added if required!
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
OR gate: $A + B$
| A | B | Output | |----|----|----| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1
|0|1||1|1|1|
8.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 NAND gate: $\overline{\text{A.B}}$
| A | B | Output | |----|----|----| | 0 | 0 | 1 | | 0 | 1 | 1 | | 1
|0|1||1|1|0|
9. Boolean Logic
XOR gate: A ⨁ B
9.1. Logic Gates and their functions
| A | B | Output | |----|----|----| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1
Six types of logic gates |0|1||1|1|0|
NOT Gate
AND Gate
OR Gate
NAND Gate
NOR Gate
XOR Gate
10. Writing Logic Statements
NOT gate: an inverter, $\overline{A}$ Logic Statements is a way of showing all the logics that are in
place for a logic circuit.
| A | Output | |----|----| | 0 | 1 | | 1 | 0 |
10.1. Writing from a logic circuit
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
1. Look at the ciruit and go around the logic gates used 1. Create a truth table with each input possible, creating
in the circuit every possible combination of inputs . Tip: For the
2. Go from the one output that is being given towards first input, write it in the combination of 1,0,1,0
the input and so on. For the second, go 1,1,0,0 and so on,
3. Write the last gate ( the first gate you walk through ) and for the third one, go 1,1,1,1,0,0,0,0 going by
in the middle and then, for each of the value coming the powers of 2 for each input. This would
into the gate, leave space at the side guarantee each possible combination
4. If the value coming into the gate is coming from 2. Run through the circuit with the inputs and get the
another gate, use a bracket for the gate’s logic output that will be reached and write it accordingly
5. Repeat process 3-4 till you are able to reach the input
values fully For logic statements, and problem statements,
convert them to logic circuits first and then do the
10.2. Writing from a truth table rest
1. Create logic circuit fom the truth table (shown later) 11.2. Example
2. Write the logic statement using the ciruit
This is the example of a truth table of a logic circuit
10.3. Writing from a Problem statement
1. See what logics go in place in the statement to take
place
2. Go from the logic of any 2 inputs at the start, and
then keep on going until you are able to reach the
final gate which gives the output
3. When writing the statement, make sure you show the
logic statement where the output is 1
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE COMPUTER SCIENCE
1. Given the truth table above, take the rows where the
output (x) is 1 (Rows 1, 2, 4, 5, 6, 7)
2. Create a logic expression from these rows (example,
row 1 will be (NOT A AND NOT B AND NOT C) = X
3. Create logic expressions for all the rows with output
1 and connect them with OR gate
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Abdullah at Levels School Of Cambridge on 08/02/25.
CAIE IGCSE
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2024. All rights reserved.
This version was created by Abdullah on Sat Feb 08 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).