Cs Practicle
Cs Practicle
ORG
CAIE IGCSE
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Angad 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 Angad at Jaffery Academy Arusha on 26/05/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
An example of a flowchart is given below from a past paper
PRINT "Hello Mr," , Name
question in which all of the functions of a flowchart are
shown: Declaration of variable - A variable/constant can be
declared by the following manner
2. Pseudocode
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Angad at Jaffery Academy Arusha on 26/05/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 Angad at Jaffery Academy Arusha on 26/05/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 Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
2.3. Validation and Verification OUTPUT "Please enter your value "
REPEAT
To ensure the acceptance of reasonable and accurate data INPUT Value
inputs, computer systems must thoroughly examine each IF LENGTH(Value) > UpperLimit OR LENGTH(Value)
data item before accepting it, and this is where Validation THEN
and Verification come into play! OUTPUT "Too short or too long, please re-ent
ENDIF
Validation UNTIL LENGTH(Value) <= UpperLimit AND LENGTH(Va
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 Angad at Jaffery Academy Arusha on 26/05/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)
e.g. in a program where only whole number values
Check Digit 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 Angad at Jaffery Academy Arusha on 26/05/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 Angad at Jaffery Academy Arusha on 26/05/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 Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
Selection is a very useful technique, allowing different routes
through the steps of a program. The code of this is explained Arithmetic, Logical and Boolean Operators
in the notes of previous chapters.
As explained in the previous chapter, we already
Iteration
Use of Nested Statements
As explained in the previous chapter, we already
Selection and iteration statements can be nested,
Totalling and Counting meaning one statement can be placed inside another.
Nested statements help reduce code duplication and
As explained in the previous chapter, we already simplify testing of programs.
Different types of constructs can be nested within each
String Handling other, such as selection statements within condition-
controlled loops or loops within other loops.
Strings are used to store text and can contain various
characters. Procedures and Functions
An empty string has no characters, while the
programming language specifies the maximum number Procedures and functions are defined at the start of the
of characters allowed. code.
Characters in a string can be identified by their position
number, starting from either zero or one, depending on A procedure refers to a collection of programming
the programming language. statements organized under a single name, invoked at
String handling is an important aspect of programming. any given point in a program to execute a specific task.
In IGCSE Computer Science, you will need to write A function is a compilation of programming statements
algorithms and programs for the following string consolidated under a singular name, invoked at any
methods: moment within a program to accomplish a particular
Length: Determines the number of characters in a task. Unlike a procedure, a function also has the
string, including spaces. capability to return a value back to the main program.
Substring: Extracts a portion of a string. Parameters refer to variables that store the values of
Upper: Converts all letters in a string to uppercase. arguments passed to a procedure or function. While not
Lower: Converts all letters in a string to lowercase. all procedures and functions require parameters, some
These string manipulation methods are commonly utilize them to facilitate their operations.
provided in programming languages through library Procedures without parameters:
routines.
PROCEDURE ProcedureName ()
Finding the length of a string: [Commands]
LENGTH("Text Here") ENDPROCEDURE
//Calling/running the procedure
LENGTH(Variable) CALL ProcedureName()
LCASE(Variable)
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
When defining procedures and functions, the header is Value1 <--- MOD(10,3) returns the remainder of 10
the first statement in the definition. divided by 3
The header includes: Value2 <---- DIV(10,3) returns the quotient of 10 divided
The name of the procedure or function. by 3
Parameters passed to the procedure or function, Value3 <--- ROUND(6.97354, 2) returns the value
along with their data types. rounded to 2 decimal places
The data type of the return value for a function. Value4 <--- RANDOM() returns a random number
Procedure calls are standalone statements. between 0 and 1 inclusive
Function calls are made as part of an expression,
typically on the right-hand side. 6.5. Creating a Maintainable Program
Local and Global Variable A maintainable program should:
Any part of a program can use a global variable – its always use meaningful identifier names for variables,
scope covers the whole program constants, arrays, procedures and functions
A local variable can only be used by the part of the be divided into modules for each task using procedures
program it is declared in – its scope is restricted to that and functions
part of the program. be fully commented using your programming language’s
commenting feature
Note: Any variables/arrays made in this procedure and
functions will be local and cannot be used out of these. Commenting in pseudocode:
To be made available all over the program, they must be
declared globally in the following way. // Now the text written is commented and thus i
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
Key point: When writing in a file, the program is
A two-dimensional array can be referred to as a table outputing the data to the file, and when reading a file,
with rows and columns. the program in inputing the data from the file
\n There are 3 ways a file can be opened in a program i.e. to
write, to read and to append
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
To store data about people, things, and events. Database management software automatically provides
Any modifications or additions need to be made only some validation checks, while others need to be set up
once, ensuring data consistency. by the developer during construction.
All users access and utilize the same set of data, For example; The software automatically validates fields
promoting uniformity. like "DateOfAdmission" in the PATIENT table to ensure
Relational databases store data in a non-repetitive data input is a valid date. \n
manner, eliminating duplication.
8.4. Basic Data Types
8.2. What makes a database?
Each field will require a data type to be selected. A data type
Data is stored in tables in databases. Each table consists classifies how the data is stored, displayed and the
of a specific type of data e.g. cars. These tables HAVE to operations that can be performed on the stored value.
be named according to what they contain e.g. a table The datatypes for database are quite similar to original
containing patient information will be PATIENT datatypes, however, there are a few differences.
These tables consist of records (rows). Each record
consists of data about a single entity (a single item,
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
entities that are written later in records e.g. car name,
car manufacturer etc.
Note: In this chapter, skills of dealing with a database Note: Access datatype refers to the software Microsoft
are also required so working with Microsoft Access is Access which is a DBMS (DataBase Management
needed to understand this chapter better. You have to be System). Here, databases could be worked upon in
able to define a single-table database from given data practical form
storage requirements, choose a suitable primary key for a
database table and also be able to read, complete and
understand SQL scripts.
8.5. Primary Key
Each record in a table represents a unique item, person,
or event.
To ensure reliable identification of these items, a field
called the primary key is necessary.
The primary key is a unique field that distinguishes each
item within the data.
In order to serve as a primary key, a field must have
values that are never repeated within the table.
An existing field can serve as a primary key if it is unique,
Source: Cambridge IGCSE and O Level Computer Science by such as the ISBN in the book table.
Hodder Education In cases where all existing fields may contain repeated
data, an additional field, such as "HospitalNumber," can
8.3. Validation in databases be added to each record to serve as the primary key.
WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
SQL Scripts
An SQL script is a collection of SQL commands that are 8.7. Operators
used to perform a specific task, often stored in a file for
reusability. Just like pseudocode, the operators used there can also be
To comprehend SQL and interpret the output of an SQL used here for conditions, however, a few more are also used
script, practical experience in writing SQL scripts is in databases
necessary.
Select Statements:
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 Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE COMPUTER SCIENCE
AND gate: $\text{A.B}$ 1. Look at the ciruit and go around the logic gates used
in the circuit
| A | B | Output | |----|----|----| | 0 | 0 | 0 | | 0 | 1 | 0 | | 1 2. Go from the one output that is being given towards
|0|0||1|1|1| the input
3. Write the last gate ( the first gate you walk through )
in the middle and then, for each of the value coming
into the gate, leave space at the side
4. If the value coming into the gate is coming from
another gate, use a bracket for the gate’s logic
OR gate: $A + B$ 5. Repeat process 3-4 till you are able to reach the input
values fully
| A | B | Output | |----|----|----| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1
|0|1||1|1|1|
10.2. Writing from a truth table
1. Create logic circuit fom the truth table (shown later)
2. Write the logic statement using the ciruit
NAND gate: $\overline{\text{A.B}}$
| A | B | Output | |----|----|----| | 0 | 0 | 1 | | 0 | 1 | 1 | | 1 10.3. Writing from a Problem statement
|0|1||1|1|0|
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
NOR gate: $\overline{A + B}$ 3. When writing the statement, make sure you show the
logic statement where the output is 1
| A | B | Output | |----|----|----| | 0 | 0 | 1 | | 0 | 1 | 0 | | 1
|0|0||1|1|0|
10.4. Example of a LOGIC STATEMENT
(B AND C) OR (A NOR (A NAND C)) is the logic statement for
the following Logic Circuit
XOR gate: A ⨁ B
| 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 Angad at Jaffery Academy Arusha on 26/05/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 Angad at Jaffery Academy Arusha on 26/05/25.
CAIE IGCSE
Computer Science
© ZNotes Education Ltd. & ZNotes Foundation 2025. All rights reserved.
This version was created by Angad on Mon May 26 2025 for strictly personal use only.
These notes have been created by Abdullah Aamir, Shriram S, Abhiram Mydi, Maimoona Junjunia & Adarsh SR Nalamalapu 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).