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

International GCSE: Computer Science

This document is a comprehensive guide for the Oxford AQA International GCSE in Computer Science, covering essential programming concepts, data structures, algorithms, and security. It includes detailed chapters on Python programming, character encoding, and SQL, along with practical examples and exercises to reinforce learning. The book is structured to align with the syllabus and aims to equip students with the necessary knowledge for higher-level study in computer science.

Uploaded by

xBOTNICx
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)
329 views8 pages

International GCSE: Computer Science

This document is a comprehensive guide for the Oxford AQA International GCSE in Computer Science, covering essential programming concepts, data structures, algorithms, and security. It includes detailed chapters on Python programming, character encoding, and SQL, along with practical examples and exercises to reinforce learning. The book is structured to align with the syllabus and aims to equip students with the necessary knowledge for higher-level study in computer science.

Uploaded by

xBOTNICx
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

Published for

OXFORD INTERNATIONAL
AQA EXAMINATIONS

International GCSE
COMPUTER
SCIENCE

Alison Page
2
Contents Define and call procedures 78
1 Foundations of Perameters
Multiple perameters
80
82
programming Functions and returned values 84
1.1 Begin programming 2.4 Structured programming
Introduction to Python 2 The structured approach to programming 86
Output 4 Advantages of the structured approach 88
Variables 6 Structured algorithms 90
Input 8
Flowcharts 10 2.5 Robust programming
Pseudocode 12 Data validation 92
Secure programming 94
1.2 Calculation Testing 96
Numerical expressions 14

l
Data types 16
3 Representing

ria
Convert data type 18
Integer division 20
Constants 22 algorithms
Processing values 24
3.1 Interpret algorithms
1.3 String handling

e
Algorithms and programs 98
Strings 26
Abstraction 100
Substrings 28

at
Purpose of an algorithm 102
1.4 Selection Trace tables 104
Selection 32 Trace tables with loops 106
eM
if... else... 34
3.2 Search algorithms
Nested if 36
Linear search 108
Boolean operators 38
Search function 110
Selection in pseudocode 40
Search a sorted list 112
1.5 Repetition Implement the binary search algorithm 114
Loops 42 Compare search algorithms 116
Counter loops 44
3.3 Sort algorithms
pl

Condition loops 46
Sorting a list 118
Nested loops 48
Bubble sort 120
Loops in pseudocode 50
Merge sort 122
End-conditional 52
Compare sort algorithms 124
m

Graphing time efficiency 126

2 Further programming
4 Number systems
Sa

2.1 Data structure


Lists 54
Output a list 56
4.1 Binary systems
Binary data 130
Add elements to a list 58
Bits and bytes 132
Arrays in pseudocode 60
Binary and decimal 134
2-D arrays and lists 62
Counting in binary 136
Records 64
Convert between binary and decimal 138
Make a list of records 66

2.2 File handling 4.2 Hexadecimal


What is hexadecimal? 140
Write to a file 68
Hexadecimal and binary 142
Read from a file 70
How hexadecimal is used 144
Files in pseudocode 72

2.3 Subroutines 4.3 Binary arithmetic


Binary addition 146
Introduction to subroutines 74
Binary multiplication 148
Random numbers 76
Binary division 150
iv
5 Digital data 8 Communications
5.1 Character encoding 8.1 Networks
Character codes 152 What is a network? 226
Unicode 154 Types of network 228
Converting text to characters 156 Network topologies 230

5.2 Images 8.2 Protocols


Bitmaps and pixels 158 Network protocols 232
Image quality and file size 160 The four-layer model 234
Turn an image into binary 162 The four-layer model (continued) 236
Creating coloured images 164

5.3 Sound
Analogue sound 166
9 Security

l
Calculating file size 168
9.1 Security threats

ria
5.4 Compression Importance of security 238
Why compression is important 170 Threats to security 240
Run-length encoding 172 Social engineering 242
Huffman coding 174 Malware 244
Build a Huffman tree 176
9.2 Ensuring security

e
Huffman compression 178
Cyber-security protection 246

at
Network security 248

6 Software Encryption
Penetration testing
250
252

6.1 Types of software


eM
Hardware and software
System and application software
182
184
10 Databases
Operating systems and utilities 186 10.1 Database design
6.2 Programming languages Introducing databases 254
Machine code and assembly language 188 Table design 256
Low-level and high-level languages 190 Primary key 258
pl

Translators 192 Relational databases 260


Database design 262

10.2 Structured query language (SQL)


7 Hardware
m

Add data with SQL 264


Edit data with SQL 266
7.1 The processor Select data with SQL 268
Components of the CPU 194 Select data from two tables 270
Sa

The fetch-execute cycle 196


Main memory 198
Performance factors
Embedded systems
200
202
11 Web pages
7.2 Storage 11.1 How webpages are made
Magnetic storage 204 What is Hypertext Mark-up Language (HTML)? 272
Optical storage 206 Designing web pages with cascading style sheets (CSS) 274
Solid state storage 208 Client-side and server-side scripting 276
Choosing the right storage 210 11.2 Creating web content
7.3 Boolean logic Building a basic web page 278
Logic gates and circuits 212 Using inline and block-level tags to
NOT gate 214 improve web page layout 280
AND gate 216 Selections, images and links 282
OR gate 218 Designing a web page using CSS 284
Logic circuits 220 Answers 286
Interpret logic circuits 222 Index 305
Logic circuits and Boolean expressions 224
v
Introduction
If you are studying Computer Science for the Oxford AQA International
GCSE, then this book is designed for you. Its purpose is to help you achieve
your best in the course and examination, equipping you with the knowledge
you need to study the subject at a higher level.
The book matches the syllabus exactly and consists of eleven chapters: chapters 1-3
cover exam paper 1 of the syllabus (Programming), while chapters 4-11 cover
exam paper 2 (Concepts and Principles of Computer Science).
To help you make the most of this student book, the following features are
used to organise the content:

Syllabus reference

l
ria
The explicit syllabus reference allows you to frame your learning and build connections
between different topics.

Introduction

e
The short introduction will make it clear what you will learn in each
lesson.

Example at
eM
Examples are given to show you what your screen should look like or to give step-by-step
guidance on what to do.

Test yourself & Learning activity


pl

The “Test yourself” and “Learning activity” questions will help you check your
understanding after each lesson and give you further opportunities to practise what you
have learnt.
m

Extension activity
Sa

The Extension Activities go beyond the requirements of the syllabus and will not be
tested in the examination. They are intended to give you a broader understanding of
computer science and hopefully you’ll find them good practice.

Programming
In this student book, Python is used as an example programming language.
There are many other programming languages and your teacher might have
chosen a different one. However, the features you will learn about are found
in almost all languages.

iii
Chapter 1
Syllabus reference
3.2.2 Programming concepts 1.1 Begin programming
Students should be able to write
programs.

Introduction to Python
Introduction
This book will help you to learn about Computer Science. The first thing
you will learn is how to write computer programs. As you learn to write
programs, you will learn more about how a computer works.
You will learn to write programs in the Python programming language.

l
ria
Begin programming
In this chapter you will learn how to write computer programs. The Python
programming language is used as an example. There are many other

e
programming languages. The features you will learn about are found in
almost all languages. You will write Python programs that use variables, loops,

features.

at
and other key features. Programs written in other languages also have these

To extend your understanding of programming you could work independently


eM
to learn about an additional language and see how it compares to Python.
This is not essential.

What is Python?
Python is a programming language. You can write programs in the Python language.
Then you can run the programs. You will control the actions of the computer.
pl

You do not have to pay to use Python. You can download Python onto your
own computer at home. That means you can practise programming outside of
m

classroom time. To download Python go to the main Python website:


https://www.python.org/
Choose “Downloads” from the menu.
Sa

Versions
There are several versions of Python. Each version has a different number.
Some start with 2, for example 2.7.10. Some start with 3, for example 3.5.3. In
this book we use version 3. You can download and use any version as long as
it begins with 3.

Integrated development environment (IDE)


Like many programming languages, Python comes with an integrated
development environment (IDE). The Python IDE is called IDLE. An IDE is
similar to a word processor. An IDE lets you type up your program and save it
like a document. However, a typical IDE has extra features you don’t find in a
word processor. For example, IDLE:
● uses colour to show different features of the program code

2
1: Foundations of programming

This code assigns the value 23 to the variable Age:


Age = 23
This code assigns the value "Bond" to the variable CodeName:
CodeName = "Bond"

Declaring variables
In some programming languages you must create a variable with a special
command before you can use it. When you create the variable you give it
an identifier and a data type (find out more about data types on page 16).
The variable is empty – it doesn’t have a value. Creating a variable is called
‘declaring’ or ‘initialising’ the variable. In Python, you do not need to declare
variables using a special command. Just start using the variable when you

l
need it in your program. A variable is declared when you assign a value to it

ria
for the first time.

Output a variable
You have learned that a print command will output a value. You can put the

e
name of a variable into the print command. The computer will output the
value stored in the variable:
print(Age)
print(CodeName)
at
eM
When you output a variable you do not put quote marks round the variable
name. You don’t want the computer to print out the name of the variable as a
word. You want it to print the value that is stored in the variable.
You can combine a string and a variable in the same output command. Put a
comma between them:
print("Your code name is ", CodeName)
pl

Test yourself
m

1. What is the name for code that represents a data value?


2. Give the command to assign the value 19.99 to the variable TicketCost. Learning activity
3. Give the command to output the value stored in the variable TicketCost. Open the computer game
Sa

program you started writing in


4. Here are four variable names. For each one say whether it is a good or bad variable
the last lesson.
name and say why.
1. Create a variable called
a Character Name
Score.
b firstName
2. Assign the value 0 to this
c 5Star variable.
d myvariable 3. Add a command to print out
e Star*Rating the variable.

7
Chapter 5
Syllabus reference
3.3.5 Character encoding 5.1 Character encoding
Understand what a character set
is and be able to describe this
character encoding method: 7-bit
ASCII.
Character codes
Understand that character codes
are commonly grouped and run in Introduction
sequence within encoding tables. Computers work with all types of data, including numbers, text, images and
Additional information sound. All these different types of data must be held in binary form inside the
Students should be able to use a
computer. When data is held in binary form it is called digital data. In this
given character encoding table to: lesson you will learn how text characters are stored using a code called ASCII.
convert characters to character

l
codes, convert character codes to
Digital data

ria
characters.
3.3.8 Data compression “Digital” is used to refer to a value that can be represented in digits as a
Be able to calculate the number number of units. A digital value does not vary in a smooth curve, but can be
of bits required to store a piece of represented by a series of distinct values. All data held inside a computer is

e
uncompressed data in ASCII. digital because the values are held as a pattern of on/off switches. We can
represent these values as binary numbers.

Text data
at
eM
The computer stores text using a number code system. Every text character
is given a code number. The first widely used system of text coding was
called ASCII. ASCII stands for American Standard Code for Information
Interchange. The first version of ASCII was produced in the USA in 1963.
ASCII has a code number for each of the common text characters on the
standard American computer keyboard. There are different codes for upper-
pl

case and lower-case letters. There are codes for the other characters that can
be typed on the keyboard such as punctuation.

ASCII codes
m

The ASCII code system is sequential. That means the number codes go up in
number order. ASCII number codes can be represented as decimal, binary or
Sa

hexadecimal values. The table shows the ASCII codes for some of the upper-
case letters of the alphabet. The code numbers are show in decimal, binary
and hexadecimal.
Character Decimal Binary Hexadecimal
A 65 100 0001 41
B 66 100 0010 42
C 67 100 0011 43
D 68 100 0100 44
E 69 100 0101 45
F 70 100 0110 46
G 71 100 0111 47
H 72 100 1000 48
I 73 100 1001 49
152
Syllabus reference Edit data with SQL
3.7.3 Structured query
language (SQL)
Introduction
Use the SQL commands UPDATE
You have learned to add data to a SQL table using the INSERT command.
and DELETE FROM to edit and
In this section you will learn to delete records from a table. You will learn
delete data in a database.
to make changes to the values in a table. These actions can be carried out
with SQL commands.

The DELETE FROM command


You can delete all the records from a data table. Then you will be left with
nothing but an empty table. For example, at the start of a new football season,

l
the match records from the previous season might be deleted.

ria
The command to delete all records is DELETE FROM. Complete the command
by giving the name of the table:
DELETE FROM Match
DELETE FROM Player

e
The WHERE command

at
SQL has a command that lets us pick out one or more records from the table.
It is the WHERE command. This command is always followed by a logical test.
eM
The computer will pick the records where the result of the logical test is True.
Here is a general example:
WHERE field = value
Look at the table below. It contains data about replacement hard drives for
computers.
pl

Product Code Product Name Supplier Description Cost


HD001 Canvio Basics 1TB Toshiba Portable External Hard 47.98
hard drive Drive 2.5 Inch USB 3.0 -
m

Black
HD002 Maxtor M3 1 TB hard Seagate USB 3.0 Slimline Portable 49.23
drive Hard Drive - Black
Sa

HD003 M3 Slimline 2 TB Samsung USB 3.0 Portable Hard 207.00


hard drive Drive - Black

Here is an example of a WHERE command:


WHERE Supplier = "Seagate"
This tells the computer to find records WHERE the supplier is Seagate. We must
put the value "Seagate" in quote marks because it is a text field.
The computer finds this record.

Product Code Product Name Supplier Description Cost


HD002 Maxtor M3 1 TB Seagate USB 3.0 Slimline Portable 49.23
hard drive Hard Drive - Black

266

You might also like