Download as pdf or txt
Download as pdf or txt
You are on page 1of 165

ard

IFYCO001

COMPUTER SCIENCE
TEACHER GUIDE
INTERNATIONAL FOUNDATION YEAR

© NCUK Ltd. 2023 IFY Computer Science TG v.1 1


TABLE OF CONTENTS
Introduction ......................................................................................................................................... 3

Module overview .................................................................................................................................. 7

Topic A – Computer Architecture ......................................................................................................... 9

Topic B – Programming in Python ....................................................................................................... 15

Topic C – Fundamentals of Computational Thinking ............................................................................ 25

Topic D – Modularity and Functions ................................................................................................... 30

Topic E – Data and Boolean Logic ....................................................................................................... 38

Topic F – Types of Software and Computer Systems ........................................................................... 49

Topic G – Data Types and Structures .................................................................................................. 66

Topic H – Networks and Communications ........................................................................................... 81

Topic I – Problem Solving, Algorithms and Program Design ................................................................. 88

Topic J – Security ............................................................................................................................... 95

Topic K – Software Development Process and Concepts ................................................................... 102

Topic L – Ethics and the Impact of Computing ................................................................................... 109

Appendix - Handouts ........................................................................................................................ 113

Teacher Guide Update History .......................................................................................................... 164

© NCUK Ltd. 2023 IFY Computer Science TG v.1 2


INTRODUCTION
This Teacher Guide is designed to assist teachers in the delivery of NCUK’s IFY Computer Science
syllabus by explaining the aims and rationale for the module together with suggestions for teaching the
content and resources.
Whilst Computer Science is a relatively new discipline, it has expanded immensely since the development
of the stored program digital computer in the 1940s. The impact of Computing on modern society is
pervasive, and the burgeoning growth of computing-related knowledge has led the ACM(2020) to define
an increasing range of sub-disciplines
(https://ncuk.itslearning.com/ContentArea/ContentArea.aspx?LocationID=11&LocationType=1&Element
ID=6168 ) ranging from hardware and software to cybersecurity, information systems and data science.
Thus there are almost unlimited opportunities for students in this diverse subject area and the current
media attention on Artificial Intelligence and its potential effect on society reinforces the importance of
the subject.
Clearly an introductory module cannot fully do justice this immense subject, but we have three
fundamental aims:
 Inspire students to study Computer Science or a related discipline and demonstrate the
opportunities available to them.
 Enable students to develop fundamental competencies in programming and theoretical knowledge
that underpin the discipline for its intrinsic value, so they are aware of what study of computing
involves and are able to develop simple software systems. .
 Ensure students are well prepared to pursue the study of computing and its related disciplines at
university level.

PEDAGOGY
Programming is the key competency in computing; all computer systems involve software. Computer
science provides underpinning knowledge and skills to support it. Programming is also a creative activity,
involving problem solving, active learning and a highly disciplined approach. Whilst some students pick it
up very quickly, most students find it challenging. It takes time to learn and practice the skills involved.
This module therefore develops programming competency progressively throughout the whole module.
Other, more theoretical topics are learned alongside it. The exemplar teaching plan suggests scheduling
theoretical topics where they directly relate to programming activities. It is assumed that approximately
half the time each week is devoted to learning programming.
To support this approach, programming competency is primarily assessed through a progressive set of
exercises, submitted as a programming portfolio, which ensures students demonstrate the mastery of
each concept in a systematic way. The critical feature of this approach is ensuring students practice
programming regularly, and consequently exercises should be completed and checked in a regular
manner throughout the course. To make this manageable for teachers, the mark scheme for each
exercise is simple.

Rationale for Python


While there are many programming languages, this module uses Python, a language that is highly versatile
and can be used for both small and complex tasks. It is also very widely used in industry, from its more
common applications in data science and software engineering to environments like mobile app
development, artificial intelligence, and machine learning. It is therefore a skill that is in demand and where

© NCUK Ltd. 2023 IFY Computer Science TG v.1 3


career opportunities exist. There are also many free IDEs for Python and lots of online resources. The
principles learned in Python are transferrable to any other high level programming language.
Object-Oriented programming (OOP) is now the dominant paradigm and whilst Python supports this, it can
also be used largely as a procedural language. This also makes it attractive as a language for introductory
programming courses. When OOP became popular there was a move to teach programming in an ‘Object-
first’ approach, especially using Java. However, OOP introduces all the procedural concepts, together with
additional complexity (and vocabulary), thus the first course in programming is better taught from a
procedural standpoint rather than OOP. Students are then well-prepared to learn OOP and functional
programming.

SCHEDULE
It is assumed that there will be 4 hours class contact each week. For the vast majority of the course the
first two hours are scheduled for the theoretical elements, in the form of lecture/tutorial. It is the
teacher’s choice how to mix the presented elements with the tutorial exercises. The second two-hour
session is planned as a lecture/lab for the practical programming elements. In the topics that follow, the
sessions are labelled lecture-tutorial or lecture-lab to distinguish the sessions.
This guide is structured by topic, rather than by week so it is not obvious exactly which sessions are
presented on each week. The exemplar teaching schedule provides a weekly plan to make this clear so it
is essential that it is read in conjunction with this guide.
Some weeks are shown as formative feedback and exam preparation. The teacher can adjust the
scheduling of teaching to suit the local timetable and capabilities of the students. The suggested
schedule is indicative, not prescriptive.

COURSEWORK & EXAMINATION


Portfolio
The purpose of a programming portfolio is to ensure that students progressively develop their
programming competencies. It ensures students demonstrate the mastery of each concept in a
systematic way. Exercises should be completed and checked in a regular manner throughout the module.
Students will produce a portfolio based on the activities provided in the brief and based on the relevant
topics taught during the module. See Appendix B for more information on portfolio guidance.

Coursework
The coursework assessment should be completed during Semester 2 at a point that is late enough to
have covered the topics related to the coursework assessment. Teachers are free to set their own
submission deadline. Students will submit their coursework online via NCUK’s assessment platform. All
assessments will be subject to a plagiarism check using Turnitin.
Teachers at the Study Centre will be responsible for marking coursework in accordance with the NCUK
issued mark scheme and the assessment criteria given in Appendix C of this document. Students should be
given sight of the assessment criteria when they are given the coursework question paper as it helps to
inform them of what is expected at each grade level. When marking, teachers will either complete the
marking and feedback form given in Appendix D and upload this to the NCUK learning and assessment
platform or complete the marking rubric presented within the platform.

Examination
The examination will cover topics from both semesters. Teachers at the Study Centre will be responsible
for marking the examination in accordance with the NCUK issued mark scheme.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 4


ACTIVITIES AND RESOURCES
The suggested activities for each topic within the syllabus are given to provide teachers with ideas on
how to deliver the content using a variety of different teaching and learning strategies, which have a
clear emphasis on active learning, and are closely aligned to the specific learning outcomes for each topic
of the syllabus.
This guide should not be seen as prescriptive or as a self-contained course but as a resource that will
help teachers to better understand the breadth and depth of course content. The suggested teaching
activities should be supplemented by teachers using resources they have developed themselves or from
other available resources e.g., textbooks, newspapers, journals, websites etc. Teachers are also
encouraged to use local examples to develop students understanding of concepts being taught.
The Teacher Guide can be used in conjunction with the Exemplar Teaching Plan presented in Appendix A
of the module syllabus document. Teachers are not expected to use all the material presented in this
document but rather select appropriate content as they see fit. Teachers in Study Centres might allocate
more or less time to the delivery of each topic, depending on the strengths and weaknesses of each
cohort of students.

Flowchart, Pseudocode and Structured English conventions


Program designs can be expressed in many different forms. The forms chosen in this course are
Flowcharts (diagrammatic) Structured English (High level design of algorithms) and Pseudocode
(Language neutral high level language code equivalent). In this course, strict syntax will not be required,
so long as the algorithm is clearly represented. Suggested conventions are provided in the resources;
these are links to the conventions used in the Isaac Computer Science website.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 5


RESOURCES
 https://teachinglondoncomputing.org/ A variety of teaching resources which are worth exploring.
 Isaac Computer Science (https://isaaccomputerscience.org/) includes resources for A-level
Computer Science (& GCSE) with short videos, text and questions. There are workbooks
(https://isaaccomputerscience.org/pages/workbook_download?examBoard=ocr&stage=a_level)
aligned to the A-level syllabi which align well to topics in this course. Teachers can register to get
a free account to download these (PDF).
 Pseudocode conventions: https://isaaccomputerscience.org/concepts/isaac_pseudocode
 Flowchart symbol conventions: https://isaaccomputerscience.org/concepts/prog_pas_flowcharts
 Structured English conventions (example) http://www.multiwingspan.co.uk/as1.php?page=english
 Youtube videos. There are an unlimited set of videos that could be useful. The A-level videos by
Craig’n’Dave (https://www.youtube.com/@craigndave) are clear and comprehensive. They explain
a wider range of topics and in more detail than this course (since A-level is 2 years) but are useful
resources. https://www.youtube.com/@craigndave/playlists?view=50&sort=dd&shelf_id=7
Python:
 The official Python site https://www.python.org/
 The Python Wiki – Essential resources: https://wiki.python.org
 Kalb, I. (2018) Learn to Program with Python 3: A Step-by-Step Guide to Programming, Apress.
 Wentworth, P., Elkner, J., Downey, A.J. and Meyers, J. (2012) How to Think Like a Computer
Scientist Learning with Python3. Available online:
https://openbookproject.net/thinkcs/python/english3e/W3Schools Tutorial on Python:
https://www.w3schools.com/python/
 Tutorialspoint on Python: https://www.tutorialspoint.com/python/index.htm
 W3Schools brief Python tutotial: www.w3schools.com/python/
 A wealth of courses, quizzes on a variety of topics: www.realpython.com
 Pycharm IDE : https://www.jetbrains.com/pycharm/
 Short Pycharm IDE Introduction video: https://www.youtube.com/watch?v=HHcZbXsZtm0

© NCUK Ltd. 2023 IFY Computer Science TG v.1 6


MODULE OVERVIEW
Key focus:

The aims of this session are to:


 Explain the purpose of the module, the module structure, outline content, assessment and time
required.
 Explain what Computer Science is, the scope of related disciplines and sub-disciplines and
opportunities available.
 Engage students in researching career opportunities in computing and discussing their aspirations
and interests.
 Introduce Python, ensure students install an IDE and create/run a ‘Hello World’ program.

Previous Learning:

This topic requires no prior knowledge.

Supporting Resources:

 UCAS website for Computer Science https://www.ucas.com/explore/subjects/computer-science


 UK National Careers service https://nationalcareers.service.gov.uk/job-categories/computing-
technology-and-digital
 https://www.python.org/
 Wentworth, P., Elkner, J., Downey, A.J. and Meyers, J. (2012) How to Think Like a Computer
Scientist Learning with Python3. Available online:
https://openbookproject.net/thinkcs/python/english3e/
 Handout-Intro: see appendix.

Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 IDE, Script, shell, Interpreter, file extension, Syntax error

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 Monitor practical programming progress and assist where required. Make sure they can download
the key text (Wentworth) and Python version 3 with the IDE you’ve chosen.

Common misunderstandings:

 Students often have difficulty downloading and installing a suitable IDE for the programming
language in use. There are many to choose from, so it is important to select one at the start that
everyone will use, otherwise it will be difficult for both teachers and students. IDLE is the VLE that
comes with Python downloads from https://www.python.org/ . A good alternative is Pycharm from
https://www.jetbrains.com/pycharm/ . The course is based on Python 3.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 7


WEEK 1 - LECTURE/ TUTORIAL: COURSE INTRODUCTION

SLO Focus N/A Duration Up to 2 hours may be needed to complete activities

1. Discuss with examples what is meant by Computer Science, why it is important to study and its
rapid growth and related subjects, such as Software Engineering, Data Science, Cyber Security,
Computer Networking, AI, Health Informatics, IT, Information Systems, Games Design and
Development, Web Development.
2. Point out that as, the QAA1 states: “Computing provides an intellectually rich, innovative, and creative
subject discipline in one of the most pervasive aspects of modern life. It requires a disciplined approach
to problem-solving, and blends theory from multiple disciplines like mathematics, engineering, and
graphical design with the solution of practical problems. Courses can be theoretical, vocational, or a mix
of both. It provides opportunities to explore complex systems and dynamic technologies. Many students
study to improve their employment prospects in a rapidly evolving, and global, digital skills
economy.”(QAA, 2022- https://www.qaa.ac.uk/the-quality-code/subject-benchmark-
statements/computing)
3. Provide examples of degree programmes in computing-related subjects and explain that this
module enables learners to gain experience, so they know enough to decide if it is for them and
prepares for further studies.
4. Present and explain the course aims, structure, outline content and time required for study.
5. Introduce the assessment tasks in outline:
a. The programming portfolio
b. Coursework
c. Exam
6. Explain how they will be marked, when they will be released and cut-off dates.
7. Explain recommended resources, and ensure that they can access the online resources, for
example:
8. Wentworth, P., Elkner, J., Downey, A.J. and Meyers, J. (2012) How to Think Like a Computer
9. Scientist Learning with Python3. Available online:
10. https://openbookproject.net/thinkcs/python/english3e/
11. Kalb, I. (2018) Learn to Program with Python 3: A Step-by-Step Guide to Programming, Apress.
a. https://isaaccomputerscience.org/?examBoard=all&stage=all: Resources for GCSE/ A-level
standard developed by University of Cambridge and Raspberry Pi foundation. Useful for
teachers and students.
12. Tutorial exercises.
a. Explain that the aim of this tutorial session is to enable you to understand what careers and
undergraduate courses are available in Computing and related disciplines. See Appendix -
Handouts – Intro.

1 Quality Assurance Agency for Higher Education


© NCUK Ltd. 2023 IFY Computer Science TG v.1 8
TOPIC A – COMPUTER ARCHITECTURE
Key focus:

The aims of this topic are to:


 Explain the components of a simple computer architecture and how they work together to execute
a program. The syllabus is limited to the Von Neumann model. The focus is on fundamental
principles, and consequently pipelining is not included and CISC/RISC architectures are not
discussed.
 Enable students to differentiate between the types of secondary storage and their typical use.
 Explain factors that affect performance.
It is envisaged that 6 hours total class time will be devoted to this topic over 3 weeks (2 hours per week).
A further 2 hours per week are also devoted to programming (see Topic B)

Specific Learning Outcomes for this topic:

A1 Explain the Von Neumann model for a computer system and the stored program concept including
Fetch Execute cycle.
A2 Explain the purpose and characteristics of hardware components.
A3 Differentiate general purpose and special purpose registers.
A4 Describe how data are transferred between various components of the computer system using
the address bus, data bus and control bus.
A5 Analyse the factors affecting performance of a computer system.

Previous Learning:

This topic requires no prior knowledge.

Supporting Resources:

 Von Neumann architecture and early computer article


https://en.wikipedia.org/wiki/Von_Neumann_architecture
 Little Man Computer introduction video https://www.youtube.com/watch?v=9AWN_ntHfPk
 Little Man Computer simulator https://peterhigginson.co.uk/lmc/
 Fetch-Decode-Execute cycle video https://www.youtube.com/watch?v=jFDMZpkUWCw
 How a CPU works video https://www.youtube.com/watch?v=cNN_tTXABUA
 RAM/ROM and Cache video. https://www.youtube.com/watch?v=g1N3l1l43kE
 Factors affecting CPU performance https://www.youtube.com/watch?v=eS1rEJZKr4U

Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Bit, Byte, kB, MB, GB, TB, PB, EB; KiB, MiB, GiB, TiB, Von Neumann model, ALU, CU, Register, bus,
data, address, assembly code, machine code, Fetch Decode Execute cycle, Primary and Secondary
storage, ROM, RAM, Optical storage, flash memory, SSD, cache memory, virtual storage, Input / Output
devices, Interrupt.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 9


How teachers could check students’ understanding of key concepts; common errors to look out
for:

 In pairs, students should write down definitions of key terms, exchanging those definitions with
other pairs for feedback.
 A Computing version of the “Taboo” game
(https://en.wikipedia.org/wiki/Taboo_(game)#:~:text=well%20as%202012.-
,Rules,which%20may%20not%20be%20spoken.). (teams of 2, groups of 4). Keywords are written
one per card, together with definition and a set of associated terms that cannot be used (taboo
words). Players are in teams of two; in their turn a player attempts to prompt their teammate to
guess the keyword by describing it but not using it or the associated (taboo) words. Each player
has an allotted time. The winning team is that with the most correct guesses. It helps students
think and articulate the meaning of terms. A great revision exercises.
 Give students anagrams of key words from the lesson; they need to work out the word and then
write a definition for it (you can create anagrams on the internet – www.wordsmith.org/anagram).

Common misunderstandings:

 One common misconception is that secondary is only for backing up, rather than for storage of
files.
 Students will confuse the use of the MAR with MDR and PC with CIR. Emphasize the difference
and reinforce with examples of F-D-E cycle.
 Students confuse Byte with bit, and in particular kB with KiB.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 10


WEEK 2 - LECTURE/ TUTORIAL

A1, A3,
SLO Focus Duration Up to 2 hours may be needed to complete activities
A4

1. Explain that in this session the focus is on how a computer works. Students will be able to:
a. Describe the Von Neumann model for a computer system.
b. Describe the purpose and role of each register in the Von Neumann model.
c. Describe the stages of the Fetch-Decode-Execute cycle.
d. Write and run simple Assembly code programs on Little Man Computer.
2. Recap on previous week and relate current session to the overall module schedule.
3. Brief Presentation: development of Computers: 1940’s Turing/ Von Neumann model; Stored
Program Digital Computers: Manchester Baby world’s first stored program computer. To show how
development has been so rapid, it is useful to contrast the speed/ size / cost changes over the
years. For example, see https://jcmit.net/memoryprice.htm
4. Present and explain the block diagram model of Von Neumann architecture.
(Input/Output/Memory/ CPU/ ALU).
a. Expand to include the various registers and busses (Address /Data / control buses) and their
purpose.
b. Explain memory addresses and word length. Discuss the role of the clock.
c. Distinguish Instructions and data.
5. Explain the concepts of High/Low level language and translation to machine code.
6. Illustrate and explain the fetch-decode-execute (FDE) cycle. The Video (Resource 4) is useful here.
7. Explain and demonstrate Little Man Computer (Resource 2/3)
8. Tutorial Exercises:
a. Students to run and write simple programs such as those at the end of the video.
9. Summarise the key points:
a. This is a simplification of the way modern computers work, but the principles are the same:
Computers execute machine code (binary) using the registers/ALU/CU; Translators are
needed (Compiler or Assembler) to convert human readable code to machine code

© NCUK Ltd. 2023 IFY Computer Science TG v.1 11


WEEK 3 - LECTURE/ TUTORIAL

Up to 2 hours may be needed to complete


SLO Focus A2 Duration
activities

1. Explain that in this session the focus is on I/O and storage. Students will be able to:
a. Describe the characteristics and uses of primary storage: RAM, ROM and
Cache.
b. Describe the uses of magnetic, flash and optical storage devices.
c. Explain the concept and purpose of virtual memory.
d. Explain how different input, output and storage devices can be applied to the solution
of different problems.
2. Recap on previous week and relate current session to the overall module schedule.
3. Explain the storage hierarchy and discuss the problematic use of terms storage/ memory etc.
Encourage more specific use: Primary and secondary storage.
4. Outline the characteristics of primary storage: RAM, ROM and Cache. Discuss relation to registers
and difference in speed, volatility, capacity etc. It is worth making students aware of the various
types of ROM and RAM, (SRAM/DRAM; PROM, EPROM and EEPROM) so they are familiar with
the names if they encounter them.
5. Discuss the units of measurement and prefixes since there is still confusion: kB, MB,GB,TB, PB, EB;
KiB, MiB, GiB , TiB
https://isaaccomputerscience.org/concepts/data_numbases_units_of_data?examBoard=all&stage=
all
6. Ask students to write down all the data that they store in secondary storage, and which device(s)
this data is stored on, e.g., a PC, tablet, mobile phone, flash drive, DVD, with reason. Ask how
secure and appropriate it is.
7. Explain the characteristics of a variety of secondary storage technologies, with illustrations and
discuss their typical uses and transfer rate/ latency / capacity. Contrast with primary storage.
Emphasize the criteria used for selection in a particular application
(Capacity/speed/cost/portability/compatibility/security).
8. Explain the concept of virtual storage and its purpose. Use examples of NAS and Cloud, asking
students for examples of where they use cloud storage. Discuss relative advantages/
disadvantages.
9. At this stage it is appropriate to introduce the concept of Interrupt since I/O devices operate
asynchronously. There is no need to go into detail, but students should be aware that the computer
has to deal with these by stopping what it’s doing and processing the interrupt so that data is not
lost.
10. Summarise that the key points: It is essential to understand the difference between primary/
secondary storage, provide examples for specific scenarios (with reasons) and explain the principles
of cache and virtual storage. Students need to be able to identify a range of I/O devices with
examples of use. A useful follow-up video is Resource 6.
11. Tutorial Exercises – See AH1 – Appendix
a. To consolidate learning provide students with a list of files, documents, software etc. and
ask them to identify if they would be stored in primary and/or secondary storage. For

© NCUK Ltd. 2023 IFY Computer Science TG v.1 12


example, word processed document while being edited, application program not in use,
phone contact details, and assignment from last term.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 13


WEEK 4

SLO Focus A5 Duration Up to 2 hours may be needed to complete activities

1. Explain that in this session the focus is on performance of a processor. Students will be able to:
a. Explain the key factors that can affect the performance of the processor.
2. Recap on previous week and relate current session to the overall module schedule.
3. A useful way of introducing the topic is to ask students to work in pairs and write down what they
think affects computer performance, and how. It is likely that they will identify correct and
incorrect factors, which is a good way of clarifying their understanding.
4. Discuss the following: Clock speed, Word Length, Data bus width, address bus width, cache,
multiple cores. Pipelining could be mentioned if desired (not examined).
5. A good summary (with useful A-level questions) is provided by Isaac Computer Science:
a. Factors affecting processor performance
(https://isaaccomputerscience.org/concepts/sys_arch_performance?examBoard=all&stage=
a_level&topic=architecture)
6. In-class exercise: provide students with several different computer specifications and ask them
which will run fastest and why they have selected it.
7. Summarise that the key points of this session and the topic.
8. Tutorial Exercises
a. Additional activities / resources to consolidate learning could be:
b. Fetch-Execute Cycle: Students physically act out the cycle: Set students up as the different
registers and components in the computer and get them to physically run the F-D-E cycle,
and instructions, by passing data and instructions between each other.
c. Video Resources 5 & 6 are useful consolidation (how a CPU works / Factors affecting
performance of CPU).
d. Create cards with terms on (below) them and corresponding definitions. These can be used
in various ways – e.g. matching definition with term, draw term from box and explain. It
could be competition between teams.

 The Arithmetic and Logic Unit  CPU


 Data and Address Control  Performance
 ALU, Control Unit and Registers  Assembly language
 Program Counter; PC  Machine code
 Accumulator  High Level Language
 Memory Data Register  Compiler
 Von Neumann architecture  Clock Speed
 Memory Address Register  Current Instruction Register
 The Fetch-Decode- Execute Cycle  Bus
 RAM

© NCUK Ltd. 2023 IFY Computer Science TG v.1 14


TOPIC B – PROGRAMMING IN PYTHON
Key focus:

Students will be introduced to the basics of programming, using a modern widely used language. The
subject is taught from a procedural paradigm perspective since this is the easiest to learn. All the
concepts are transferrable to other procedural and Object-Oriented languages. Other paradigms (Object-
Oriented and functional) are outlined at the end of the unit to provide an awareness of other approaches.
The emphasis is on practical programming to build confidence and competence.
The aims of this topic are to:
 Explain the concepts of procedural programming and implementation in a modern language.
 Enable students to design, implement, test and debug simple programs.
It is envisaged that the teaching programming (Topics B, D, G, I) will span almost the whole module, in
parallel with teaching of theoretical topics. (2 hours per week).

Specific Learning Outcomes for this topic:

B1 Describe common application areas of Python and its relative benefits.


B2 Explain, write and amend programs which use a variety of basic data types, variables, constants
and expressions.
B3 Convert a program design from Structured English, Flowchart or Pseudocode into Python.
B4 Explain, write, and amend programs which use sequential text file input and output.

B5 Construct and explain a suitable test plan for a program.


B6 Write programs which use sequence, selection and iteration statements.

Previous Learning:

This topic requires no prior knowledge.

Supporting Resources:

 https://www.python.org/
 Python quizzes: https://pynative.com/python/quizzes/
 https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
 The print version of Wentworth’s book: https://openbookproject.net/thinkcs/python/english3e/
 Kalb, I. (2018) Learn to Program with Python 3: A Step-by-Step Guide to Programming, Apress.
 Wentworth, P., Elkner, J., Downey, A.J. and Meyers, J. (2012) How to Think Like a Computer
Scientist Learning with Python3. Available online:
 https://openbookproject.net/thinkcs/python/english3e/
 https://www.w3schools.com/python/

© NCUK Ltd. 2023 IFY Computer Science TG v.1 15


Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Sequence, selection, Iteration, loops (while, for), Integer, real, string, boolean, flowchart,
pseudocode, structured English, test plan, expression, constant. Script, shell, interpreter.

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 In pairs, students should write down definitions of key terms, exchanging those definitions with
other pairs for feedback.
 Pair programming: some exercises can be worked on in pairs, with students initially writing their
own code, discussing and coming to a consensus.
 Short quizzes at the start of a session covering syntax, concepts and spotting errors in snippets of
code which relate to previous sessions have been found very useful in programming courses.
 Old exam questions, especially the MCQs are useful for quick checks of understanding.
 Online quizzes from w3schools.com python tutorial.

Common misunderstandings:

 Assignments are often misunderstood as equations. Emphasize that this is not the case.
 Types and type conversion can be problematic in Python as declaration is on first use. The concept
of static types should be taught, even if it is through pseudocode, to improve transferability of
knowledge. For simplicity this course does not include the type hints introduced in Python 3.5
though you may consider teaching it. It is not examinable.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 16


WEEK 1

SLO Focus B1, B2 Duration Up to 2 hours may be needed to complete activities

1. Explain that in this session students will be able to:


a. Download the textbook (Wentworth).
b. Download and install Python.
c. Write and modify a simple program.
d. Complete Portfolio exercises.
2. Explain why Python is the language of choice for this course: It is easy to learn, use and install; It is
very widely used and a modern language.
3. Explain relevant and useful parts of Python.org: Different versions, Downloads, Tutorials, in
particular https://wiki.python.org/moin/BeginnersGuide/NonProgrammers and the print version of
Wentworth’s book. https://openbookproject.net/thinkcs/python/english3e/
4. Demonstrate how to download Python3 from https://www.python.org/
and install it.
5. Demonstrate the IDE you have chosen. IDLE is included with Python and has been used for this
guide. Wentworth uses his own (PyScripter - https://sourceforge.net/projects/pyscripter/) which
can be downloaded if desired. Kalb uses IDLE. PyCharm (https://www.jetbrains.com/pycharm/)
Community edition is more complex but provides more extensive features/ interface that is more
like a professional IDE.
6. Lead students through using the IDE to create a ‘Hello World’ Program.
7. During the demonstration explain the terms IDE, Program, bug, syntax error, Script, shell,
Interpreter, file extension.
8. Explain how to add comments to programs as these are required in all programs in the portfolio.
9. Summarise that the key points of this session.
10. Tutorial and Lab Exercises.
a. Ask students to complete exercises you select from Wentworth (Chapter 1.12).
11. Introduce the portfolio exercises.
b. Explain how you intend to collect/mark return/ feedback on portfolio exercises.
c. A Portfolio research exercise could be class based or independent study/ homework.
d. Simple programming exercises in the portfolio could be completed in class since individual
work can be monitored.
e. Wentworth Chapter 1 would be suitable independent study.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 17


WEEK 2

SLO Focus B2, B6 Duration Up to 2 hours may be needed to complete activities

1. Explain that in this session students will be able to:


a. Write programs using variables of different types and sequential statements.
b. Write statements and expressions and explain the precedence rules for operators.
c. Complete Portfolio exercises.
2. Recap on previous week and relate current session to the overall module schedule.
3. This session aims to build on the familiarity with Python that students gained in the previous week
by introducing the following, which broadly map to chapter 2 of both Kolb and Wentworth. One of
the disadvantages of Python is the lack of static typing but the concepts are so important they
should be stressed and point out (with an example) that other languages require type declarations
of variables.
a. Variables, identifiers, keywords
b. Data types, Integer, Float, String, Boolean
c. Statements, Expressions, operators and precedence
d. Type conversion
e. Printing variables, expressions
4. Depending on the facilities available, a useful way of teaching this topic is to demonstrate
programs and explain the details, followed by a set of short exercises for students to practice.
5. Summarise the key points of the session.
6. Tutorial Exercises.
a. Wentworth has suitable exercises at the end of each chapter (q1-6)
7. Introduce relevant Portfolio exercise and monitor students’ progress.
a. Wentworth Chapter 2 would be suitable independent study

© NCUK Ltd. 2023 IFY Computer Science TG v.1 18


WEEK 3

SLO Focus B2, B3, B6 Duration Up to 2 hours may be needed to complete activities

1. Explain that in this session students will be able to:


2. Explain what is meant by Structured English, pseudocode and algorithm and use Structured English
to represent simple algorithms.
a. Convert algorithms in Structured English to Python.
b. Explain variable naming conventions.
c. Complete Portfolio exercises.
3. Recap on previous week and relate current session to the overall module schedule.

4. Start with a problem of an assignment, for example: what does the following program print?

i. x = 5
ii. x=x+1
iii. y = "John"
iv. print(x)
v. print(y)

5. Explain the assignment x=x+1 and distinguish from an equation.

a. What if it was

i. x+1=x
6. Introduce the concept of Algorithm and representing them in structured English. A useful way of
introducing algorithms is by developing them for everyday tasks first of all, to show concepts of
sequence, selection and iteration. At this stage it is recommended that algorithms are represented
as informal structured English, rather than the more formal pseudocode which A-level exam boards
require. The key ideas are to develop the algorithm and control structures, and identify the data
(variables) needed and their type rather than be distracted by syntax.
7. The resources in Teaching London Computing (https://teachinglondoncomputing.org/resources/),
for example the, contain a variety of potentially useful and interesting ideas for discussing and
teaching algorithms and computational thinking. The age range that the resources are aimed at is
wide, so select those appropriate for your style and students.
8. Example exercises / examples could be:
a. Cleaning teeth; Making a sandwich or cup of tea; Getting to college; Creating a new folder
on the desktop; Putting up a tent, buying something from a shop.
9. More specific computing related ones such as: Calculating and printing the average of 5 numbers
when they are entered from the keyboard.
10. Discuss what happens when instructions are in wrong order, logic errors, debugging.
11. Introducing the concepts of selection and loop. A useful way is to discuss the need for input
validation with an example. Represent in structured English prior to code in later sections.
12. Introduce the idea of Flowchart for representing design as an alternative to structured English. You
may want to use the conventions shown in
https://isaaccomputerscience.org/concepts/prog_pas_flowcharts?examBoard=ocr&stage=a_level

© NCUK Ltd. 2023 IFY Computer Science TG v.1 19


13. Summarise the key points of the session.
14. Introduce relevant Portfolio exercise and monitor students’ progress.

a. Kalb Chapter 2 (selected sections) would be suitable independent study.

Note: Weeks 4-5 are Topic C (Fundamentals of Algorithmic Thinking)


Weeks 6 -9 are Topic D (Modularity and Functions)

© NCUK Ltd. 2023 IFY Computer Science TG v.1 20


WEEK 10

B2, B3, B5,


SLO Focus Duration Up to 2 hours may be needed to complete activities
B6

This session assumes that the section on Boolean algebra (Topic E) has been completed. In the
example teaching plan it is scheduled for week 8, preceding this session.
The material in this chapter is covered by the set books: Kalb Chapter 5 and Wentworth Chapter 5.
Integrating the teaching of flowcharts with code is an effective way of reinforcing learning of these
concepts and the syntax. The match/case statement introduced in Python 3.10 is not included in direct
teaching but is included as part of the exercises.

1. Explain that in this session students will be able to:


a. Write programs using selection/ conditional statements, logical operators:
AND/OR/NOT.
b. Draw Flowcharts and pseudocode for IF THEN ELSE, ELIF, Nested conditionals.
c. Construct test plans for a simple program.
2. Recap on previous week and relate current session to the overall module schedule.
3. Start with a suitable simple problem such as Input a test mark and print Pass or Fail depending on if
the mark is above a threshold, say 40.
a. Draw the flowchart.
b. Convert it to pseudocode (for illustration to reinforce what pseudocode is).
c. Convert it to Python If-Then-Else.
d. Discuss Boolean expression and the syntax of the 6 Python relational operators ==, !=, >=
etc.
4. Extend the discussion of conditionals with Boolean operators AND, OR, NOT and show how they
are used in Python.
5. Extend discussion of IF-Then-Else:
a. Example without an ELSE, draw flowchart and code.
b. Example with Chained conditionals, ELIF, flowchart and code. For example program to enter
2 numbers and an operator +,-, *, / and apply it.
c. Example with Nested IF-Then-Else, flowchart and code. For example, extend previous
program to validate input.
6. Concept of Test plan, ask what purpose and contents?
7. Construct a plan for your example with If/Then/Else.
8. Summarise the key points of the session.
9. Tutorial Exercises.
a. See BH1 - Using conditional (selection) statements for suggestions.
b. Kalb (Ch 5) and Wentworth (Ch 5) would be suitable independent study.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 21


WEEK 11

B2, B3, B5,


SLO Focus Duration Up to 2 hours may be needed to complete activities
B6

This session introduces the iteration with the while loop. Chapter 6 of Kalb, I. (2018) develops the
concept and further programming techniques with some useful examples: ‘Sum the numbers’, guessing
number game (also introduces RND). NB if you follow this chapter, Kalb’s definition of pseudocode
(p164) is what we have called structured English, it shows there is no agreed definition!
1. Explain that in this session students will be able to:
a. Explain iteration with While Loop, Counters and program them in Python.
b. Use the break and continue statements.
c. Draw flowcharts for loops.
d. Use the Python Random number generator.
2. Recap on previous week and relate current session to the overall module schedule.
3. Discuss, with examples the following concepts, flowchart and code, for example from Kalb:
a. Concept of a loop – Flowchart - link back to validation or ‘real world’ example such as while
hungry eat.
b. Python While statement.
c. Example program with While, such as: input integer: print sum of integers to that number -
(or factorial).
d. Emphasize the role of counter variable, its initialization and when tested.
4. Introduce concept of Python built-in and external packages. Next example will need random
number so will use the Random Package: import random. Explain random, rand, range (low, high).
5. Introduce and distinguish the concepts of break and continue statements using a flowchart and
example code. (See Kalb p175).
6. Develop structured English (and flowchart) for the guessing numbers game. This can be done
interactively: Demonstrate the working game, ask students to suggest how it can be created,
develop the ideas on board till structured English is complete; get students to convert to flowchart
and then code.
7. Summarise the key points of the session.
8. Tutorial Exercises.
a. See BH1 – While loops for suggestions.
b. Wentworth Chapter 7 would be suitable independent study.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 22


WEEK 12

This session enables students to clarify any problem areas. No new material is introduced, students
should complete portfolio exercises in class, and you should monitor their progress. This is an
appropriate point to introduce ideas of debugging logical errors, emphasizing a systematic approach
and using the IDE breakpoint and debugging facilities (depends which IDE you have selected).
1. This session aims to consolidate and extend knowledge by:
a. Portfolio exercises.

Note: Weeks 11-19 are Topic G (Data Types and Structures)

© NCUK Ltd. 2023 IFY Computer Science TG v.1 23


WEEK 21

B2, B3, B5,


SLO Focus Duration Up to 2 hours may be needed to complete activities
B6

This session introduces basic file processing in Python, based on Kalb Chapter 9 and Wentworth
Chapter 13. Wentworth is concise and covers the essentials with small examples. Kalb provides a more
comprehensive treatment, with some quite large examples that illustrate creation of modules and use
of wrapper functions. The session should also recap on the concepts of files in topic E.
1. Explain that in this session students will be able to:
a. Explain how Python can be used to read from and write to sequential text files.
2. Recap on previous week and relate current session to the overall module schedule.
3. Recap of Files and file types: Text/binary with examples. Records, Sequential/ Random access.
Sequential files.
4. Discuss the concept of path and explain relative and absolute path and how these are used in
Python.
5. Explain the basic process of file processing and the use of the file handle.
Reading from a file:
a. Open the file for reading.
b. Read from the file (usually into a string variable) – usually in a loop.
c. Close the file.
6. Writing text to a file requires three similar steps:
a. Open the file for writing.
b. Write a string (usually from a string variable) to the file.
c. Close the file.
7. Present and discuss simple examples of reading/writing sequential text files, initially a single string
then using loop. Emphasize need to check EOF.
a. Typical difficulties, that students experience, are locating the file and consequent errors.
Emphasize the use of relative paths.
8. Summarise the key points of the session.
9. Tutorial Exercises.
a. Handout BH1 exercises on File processing.
b. Independent study – Students should read Kalb Chapter 9.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 24


TOPIC C – FUNDAMENTALS OF
COMPUTATIONAL THINKING
Key focus:

Topic B briefly introduced the idea of an algorithm and representing it in Structured English or Flowchart.
This topic builds on these foundations to further develop the ideas of how algorithms for larger problems
can be designed in a structured and systematic way.

The estimated time for these sessions is 4 hours.

Specific Learning Outcomes for this topic:

C1 Explain computational thinking and its uses.


C2 Analyse different types of abstraction in computational thinking.
C3 Explain top-down and divide and conquer techniques.
C4 Use algorithmic thinking to solve well-defined problems.

Previous Learning:

The topic requires some concepts introduced topic B.

Supporting Resources:

 https://isaaccomputerscience.org/?examBoard=all&stage=all section on computational thinking:


https://isaaccomputerscience.org/topics/computational_thinking
 Edwards et al(2012) Problem solving and algorithms http://sofia.cs.vt.edu/cs1114-
ebooklet/chapter4.html
 Craig’n’Dave Video: Analysis and design of algorithms
https://www.youtube.com/watch?v=L_PrAWzUp3M
 Craig’n’Dave Video (explaining ): Computational Thinking
https://www.youtube.com/watch?v=dHWmnayy8MY
 CH1 – Tutorial exercises – See Appendix A

Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Computational thinking, abstraction, decomposition and refinement, algorithm, modelling.

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 Create a word search with key terms. Students find the terms and write down definitions for each
one.
 Match description of activities with the concept.
 Problem sheets developing simple algorithms.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 25


 Students often cannot spot sub-problems or phrase in procedural terms. Use of progressive
examples helps students to start thinking in computational ways.

WEEK 4

C1, C2, C3,


SLO Focus Duration Up to 2 hours may be needed to complete activities
C4

This session introduces the ideas of computational thinking and algorithm design.

1. Explain the Learning outcomes for the topic, and that in this session the SLOs are:
a. Explain computational thinking and its uses.
b. Analyse different types of abstraction in computational thinking.
c. Explain top-down and divide and conquer techniques.
d. Use algorithmic thinking to solve well-defined problems.
2. Explain that in this session students will be able to:
a. Explain computational thinking and process of developing an algorithm.
b. Write simple algorithms in structured English using the principles of computational thinking.
3. Introduce the topic explaining that computing is mostly about solving problems, and these have
become increasingly complex, so we need approaches to combat that complexity and construct
programs that the computer can execute.
a. Computational thinking techniques and methods are essential when formulating a problem
and expressing a solution so that a computer can effectively it carry out.
4. Computational thinking involves the following cognitive activities. Give definitions of each with a
simple example from everyday life.
b. Pattern recognition.
c. Abstraction and modelling.
d. Logical Reasoning.
e. Decomposition and refinement.
f. Algorithms.
5. Algorithm development: See Handout CH1 and explain the steps with an example.
g. Understand and describe the problem.

h. Analyse the problem (what data, formulae, rules, patterns etc).

i. Develop high level algorithm (abstraction)Logical reasoning – steps.

j. Decomposition and refinement – more detail.

k. Review the algorithm / generalization.

6. You may like to work through the Example: Jeroo on a grid. Looking for flowers
(http://sofia.cs.vt.edu/cs1114-ebooklet/chapter4.html).
l. Rules: every Jeroo can hop forward, turn left and right, pick a flower from its current
location, and plant a flower at its current location.
m. Problem Statement (Step 1).

© NCUK Ltd. 2023 IFY Computer Science TG v.1 26


7. A Jeroo starts at (0, 0) facing East with no flowers in its pouch. There is a flower at location (3, 0).
Design an algorithm that directs the Jeroo to pick the flower and plant it at location (3, 2). After
planting the flower, the Jeroo should hop one space East and stop.

a. Analysis of the Problem (Step 2)

i. The flower is exactly three spaces ahead of the jeroo.

ii. The flower is to be planted exactly two spaces South of its current location.

iii. The Jeroo is to finish facing East one space East of the planted flower.

iv. There are no nets to worry about.

b. High-level Algorithm (Step 3)

i. Let's name the Jeroo Bobby. Bobby should do the following:

1. Get the flower.

2. Put the flower.

3. hop East.

c. Detailed Algorithm (Step 4)

i. Let's name the Jeroo Bobby. Bobby should do the following:

1. Get the flower.

a. Hop 3 times.

b. Pick the flower.

2. Put the flower.

a. Turn right.

b. Hop 2 times.

c. Plant a flower.

3. Hop East

a. Turn left.

b. Hop once.

d. Review the Algorithm (Step 5).

i. The high-level algorithm partitioned the problem into three rather easy sub
problems. This seems like a good technique.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 27


ii. This algorithm solves a very specific problem because the Jeroo and the flower are
in very specific locations.

iii. This algorithm is actually a solution to a slightly more general problem in which the
Jeroo starts anywhere, and the flower is 3 spaces directly ahead of the Jeroo.

e. Tutorial exercises:

i. Handout CH2 Modelling and developing algorithms for small systems, representing
with Structured English.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 28


WEEK 5

C1, C2, C3,


SLO Focus Duration Up to 2 hours may be needed to complete activities
C4

This session consolidates and extends the ideas of computational thinking and algorithm design.

1. Explain that in this session students will be able to:


1. Write algorithms in structured English using the principles of computational thinking.
2. Start with a recap of the previous session and revise the concepts with a quiz such as define the
terms:
a. Pattern recognition
b. Decomposition and refinement
c. Logical thinking
d. Abstraction
Alternatively, a match the definition with the term or recognise an example and match with the
correct term.
3. Further Practice of algorithm design through coursework development and tutorial exercises in
CH2.
4. Tutorial exercises:
a. Handout CH2 Modelling and developing algorithms for small systems, representing with
Structured English.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 29


TOPIC D – MODULARITY AND FUNCTIONS
Key focus:

There are two primary aims for this topic: firstly the rationale for developing modular software, which
relates closely to software engineering and Topic C (Computational Thinking) since it includes
abstraction, decomposition and refinement. The second aim is to teach how to implement modular
software in Python.
Students have previously been introduced to built-in functions and consequently have some knowledge
of arguments and return values. However, it is traditionally an area where students can be confused over
the matching of actual and formal parameters, and local/ global variables, so these need reinforcing
throughout the topic.
The topic is structured as follows:
 Abstraction and Modularity.
 Decomposition & refinement.
 Functions in Python, including:
o Parameters/ Arguments.
o Return values.
o Calling functions.
o Defining functions.
 Built in functions and libraries.

Specific Learning Outcomes for this topic:

D1 Explain, with examples, the rationale for constructing modular software.

D2 Explain the operation of a simple function (including arguments) in Python.

D3 Write and use a simple function with arguments.

Previous Learning:

This topic requires students to understand the basics of Python as discussed in the first 4 sessions of
Topic B, including an introduction to built-in functions.

Supporting Resources:

 Kalb Chapter 4 User defined functions explains these concepts and practical implementation.
 Isaac Computer Science Computational thinking section:
https://isaaccomputerscience.org/topics/computational_thinking?examBoard=all&stage=all
 DH1 – Worksheet- Programming exercises – See Appendix A

© NCUK Ltd. 2023 IFY Computer Science TG v.1 30


Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Abstraction, decomposition, refinement, module, function, argument, parameter, local variable,
global variable, scope.

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 Create a word search with key terms. Students find the terms and write down definitions for each
one.
 Monitor students’ progress in programming exercises.

Common misunderstandings:

 Local and global variables are often confused, as are actual and formal parameters.
 Function arguments and parameters require plenty of practice to consolidate knowledge. Using
different names for formal parameters and actual parameters helps reduce confusion.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 31


WEEK 6

B2, B6, D2,


SLO Focus Duration Up to 2 hours may be needed to complete activities
D3

1. Explain the Learning outcomes for the topic are:


a. Explain, with examples, the rationale for constructing modular software.
b. Explain the operation of a simple function (including arguments) in Python.
c. Write and use a simple function with arguments.
2. Explain that in this session students will be able to:
a. Write programs using built in functions, arguments including type(), abs(), bin(), hex().
b. Import and use the math module.
c. Write programs including a maths functions such as math.sqrt() and maths.constants such
as math.pi..
d. Complete Portfolio exercises.
3. Recap on previous week and relate current session to the overall module schedule.
a. Start with a problem or quiz such as:

i. How do you write a comment in Python?

ii. What is the purpose of a comment?

iii. What errors can you find in the following code designed to find the square of a
number?
num= input('Enter a number: ')
squareOfNumber = num + num
print("square of" ,num ,"is", squareOfNum
4. Gives opportunity to discuss syntax and logical errors and type conversion and discuss built-in
functions introduced in week 2
a. Recap on built in functions used already (type conversion).
b. Kalb Chapter 3 is a suitable basis for this lesson; using demonstrations from the chapter.
c. Discuss formal elements of a function: Function call; arguments, result using examples.
d. Combining function calls in an expression – with examples.
e. Introduce the idea of libraries and show the Python standard maths library:
https://docs.python.org/3/library/math.html
f. Introduce use with an example such as:
import math
pi = math.pi
print(' print square root of a number')
x = float(input(" Enter number "))
root=math.sqrt(x)
print("sqrt is",root)

5. Summarise the key points of the session.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 32


6. Tutorial Exercises.

a. Give students several programming exercises to use type conversion functions and maths
functions using the library.

i. For example ceil, fabs, floor, trunc which help students understand real vs integer.
Contrast with round()

ii. Other general functions such as trigonometry, factorial.

iii. Include exercises which require maths constant pi

b. Introduce Portfolio exercise and monitor students’ progress.

i. Kalb Chapter 3 would be suitable independent study.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 33


WEEK 7

D1, D2, D3
SLO Focus Duration Up to 2 hours may be needed to complete activities
C1,C3

1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Explain, with examples, the rationale for constructing modular software.
b. Explain the operation of a simple function (including arguments) in Python.
c. Write and use a simple function with arguments.
2. Explain that in this session students will be able to:
a. Explain, with examples the concepts of abstraction, modularity, decomposition and
refinement, to write good programs.
b. Write simple Python functions with arguments.
c. Explain the scope of arguments.
d. Write Python programs that make use of user-defined functions.
3. Modules and Abstraction:
a. Discuss real life examples of using modularity/ abstraction, eg computer system with a
separate screen, keyboard, mouse etc (modules). We don’t need to know how they work,
(Abstraction) they just plug together. We could buy another monitor or keyboard. They
have a standard interface so can be plugged in. This type of abstraction is called functional
abstraction.
b. Abstraction means removing unnecessary detail. Abstraction is widely used to simplify
things that may be very complex. Humans use abstractions all the time. It is a very powerful
idea, we couldn’t understand the complexity of the world otherwise.
4. Modularity and Abstraction in programming. Explain the following points:
a. Software development is very complex, we need ways to simplify it. Way back in the
1960s/70s there was the ‘software crisis’ software didn’t work because it was too complex
and had too many errors (bugs).
b. Combat with abstraction and modularity: break down the problem into smaller parts
(modules) This is called decomposition. Good modules:
i. are self-contained, ideally do ONE task.
ii. used to break up code.
iii. intended to be reusable.
iv. keep code organized.
v. keep code coherent.
c. In this course we achieve decomposition with functions, considered a black box.
5. Introduction to user-defined functions in Python.
a. Simple examples without arguments.
b. Emphasize need to indent Function body and order of code (function/ main program) in the
file.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 34


c. Return.
d. Calling functions.
e. Extend with arguments.
f. Compare with built-in function.
g. Introduce scope – formal parameter and binding of argument and formal parameters.
6. Summarise the key points of the session.
7. Tutorial Exercises:
a. DH1 – Exercises and directed reading – see appendix

© NCUK Ltd. 2023 IFY Computer Science TG v.1 35


WEEK 8

D1, D2, D3
SLO Focus Duration Up to 2 hours may be needed to complete activities
C1, C3

The focus of this session is consolidation of learning about functions, extending with discussion of
global and local variables and their scope, trace tables and adding return values to functions. The session
also introduces Turtle graphics in preparation for the following week. A simple exercise is included for
the portfolio.
1. Explain that the session today will extend knowledge about functions, including return values.
2. Recap on learning from last week: Short quiz, e.g.:
a. What will this program print?
def calculateArea(length, width):
# calculate area of rectangle
x = length* width
print ("area is: " ,x)
return
x=3
y=4
calculateArea(x,y)
print("X=",x)
3. This provides a suitable example to start the discussion of scope. Explain local and global variables
and their scope. Point out it is considered bad practice to use global variables inside a function,
since it violates the principle of information hiding, any data used in a function should ideally be
passed in via parameters.
4. Introduce the idea of a return value and demonstrate with a program.
5. Introduce the idea of a trace table to follow what is happening to variables. Give a demonstration.
6. Turtle Graphics
7. Introduce Turtle graphics using chapter 3 from the set book: Chapter 3 Hello, little turtles!
https://openbookproject.net/thinkcs/python/english3e/hello_little_turtles.html
8. Summarise the key points of the session.
9. Exercises:
a. Students should now read and do the exercises in Chapter 3 up to the end of section 2
(before FOR loops).
10. Students should complete the portfolio exercise for this week.
11. Preparation for next week – read the next section on FOR loops.
a. Kalb Chapter 4 is further suitable independent study.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 36


WEEK 9

D1, D2, D3
SLO Focus Duration Up to 2 hours may be needed to complete activities
C1, C3

The focus of this session is consolidation of learning about functions. The session also extends Turtle
graphics, incorporating functions and parameters for Turtle movements. The FOR loop should also be
explained at this point. The set book uses a flowchart to show the operation of the loop. It is a good
opportunity to introduce those as a design language.
1. Explain that the session today will consolidate knowledge about functions, incorporating them into
turtle graphics programs, and also explain FOR loops and trace tables.
2. Recap on learning from last week: Short quiz, e.g.:
3. What will this program print?
a. def calculateAverage(param1, param2):
b. # Add up the numbers and divide by the number of numbers
c. total = param1 + param2
d. average = total / 2
e. return average
f. av = calculateAverage(calculateAverage(2,4),5)
g. print ("average is: " ,av)
4. Discuss the nesting of the function call and which is completed first.
12. For Loops: Introduce Turtle graphics using chapter 3 from the set book: Chapter 3 Hello, little
turtles! https://openbookproject.net/thinkcs/python/english3e/hello_little_turtles.html
Section 3.3 to the end of the chapter. This is revisited in Topic G when discussing lists.
5. Explain the flowchart symbols and its meaning as a design language (section 3.4).
6. Example trace table with loop & function.
7. Summarise the key points of the session.
8. Select appropriate exercises from the end of the chapter and then let students complete the
portfolio exercises which combine functions with turtle graphics.

Note: Week 10 resumes topic B

© NCUK Ltd. 2023 IFY Computer Science TG v.1 37


TOPIC E – DATA AND BOOLEAN LOGIC
Key focus:

This topic builds on the previous knowledge of computer architecture by looking at how data is
represented and stored in detail. The concept of primitive data types was introduced in Topic B where
students used them in programming tasks. Point out that it is essential to understand how data is
represented to program efficiently and manipulate it. The topic also introduces the basics of file
organisation, which are used in later programming exercises. The point here is to build awareness that
the organisation affects speed of access and the ways the data can be manipulated (insert/delete etc.).
The topic also incorporates Boolean logic, to illustrate both the building blocks of a computer, and to
reinforce the logic that is foundational to computer programming (and all computer science). Topics such
as fuzzy logic are left for further study.
The aims of this section are to:
 Explain the different types of data and how it is represented in a computer.
 Explain the fundamentals of logic and Boolean algebra including symbols and truth tables.
 Explain the concept of a file including sequential and random access methods.
This topic is envisaged to take five Lecture-tutorial sessions, each of two hours are scheduled for this
topic.

Specific Learning Outcomes for this topic:

E1 Explain how numeric, text, image and sound data are represented in a computer.
E2 Convert positive integers between binary hexadecimal and denary.
E3 Perform addition of binary integers in two’s complement representation.
E4 Construct truth tables for logical expressions.
E5 Explain sequential and random-access file structures.

Previous Learning:

Students will be expected to have a basic understanding of the primitive data types from Topic D, but no
other prior knowledge is needed.

Supporting Resources:

 Representing signed integers video: https://www.youtube.com/watch?v=9W67I2zzAfo


 Isaac Computer Science has very useful sections:
o https://isaaccomputerscience.org/topics/number_representation?examBoard=all&stage=a
_level
o https://isaaccomputerscience.org/concepts/sys_bool_what_is_boolean_logic?examBoard=
ocr&stage=a_level
 EH1 (Denary/Hex Jigsaw) Activity sheet - see Appendix A.
 EH2 (Research exercise on image representation) - see Appendix A.
 EH3 (Boolean algebra exercises) - see Appendix A.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 38


Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Binary, Hexadecimal, Integer, Real/ Floating Point, mantissa, exponent, normalised form (floating
point), String, Character, 2’s complement representation, truth table, Boolean algebra NOT, AND,
OR, NAND, NOR, XOR gates and symbols.

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 Students write down the definition of key terms. A good enhancement is the Taboo game (see Topic
A).
 Check answers to exercises.
 Give students anagrams of key words from the lesson; they need to work out the word and then
write a definition for it (you can create anagrams on the internet – www.wordsmith.org/anagram).

Common misunderstandings:
 Unless students have studied computing previously, they are unlikely to have come across many of
these concepts before. They often find them difficult and lots of practice is required.
 Confusion of character code for a digit with the value of a digit. This needs emphasizing when
discussing text representation.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 39


WEEK 5

SLO Focus E1, E2, E3 Duration Up to 2 hours may be needed to complete activities

1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Explain how integers are represented on a computer.
b. Convert positive integers between binary hexadecimal and denary.
c. Perform addition of binary integers in two’s complement representation.
2. Explain the representation of numbers in Binary, Hex and Decimal and their conversion. Octal is
omitted since it is very rarely used these days. Use examples and EH1 (Denary/Hex Jigsaw)
exercise.
3. Discuss primitive data types that they came across in programming: Integer, Real/Floating Point,
Character, String and ask for examples. Ask for examples of each and how much storage (bits) each
type takes and why it is important. Use the responses to discuss why storage varies. Recap on KB,
KiB, kB from Topic A if necessary.
Typical storage
Character 4 bytes (Unicode)
String 4 bytes for each character (Unicode)
Boolean 1 bit
Integer 4 bytes
Float 4 bytes
4. Explain today we’ll concentrate on how positive and negative integers are represented in a
computer. A useful video https://www.youtube.com/watch?v=9W67I2zzAfo
a. Explain how positive integers are represented.
b. Ask how negative integers could be represented.
c. Explain Sign and Magnitude since this is very simple and intuitive. Ask for problems (expect
them to identify that there are 2 representations of zero) also difficult to implement in
hardware.
d. Explain 2’s complement representation and addition.
5. Summarise the key points of the session:
6. Tutorial Exercises:
a. Provide a mixed set of exercises covering conversion of binary/hex/denary, integers in
various word lengths and addition of integers in 2’s complement.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 40


WEEK 6

Up to 2 hours may be needed to complete, plus homework


SLO Focus E1 Duration
time may be needed to complete this activity.

1. Explain that in this session the SLO is:


a. Explain how Real numbers are represented on a computer and discuss the issues of
rounding.
2. Recap on learning from last week: short quiz, e.g.:
a. Convert 57 (denary) to Binary(8 bits) and Hexadecimal Answer: 001110012, 3916.
b. If the following 8 bit numbers (in Hex) are in 2’s complement, what do they represent in
denary?
2s C (Hex) Denary
2A 42 10
AA -86 10
3. Discuss the concepts of representing real numbers, starting with decimal.
a. Fixed Point – what does it mean?
b. Floating Point: Exponent and mantissa, give examples and exercises.
4. Discuss how fractional numbers can be represented in binary. Isaac Comp Sci has useful summary
(https://isaaccomputerscience.org/concepts/data_numbases_fractional_numbers?examBoard=all&s
tage=a_level&topic=number_representation ):
a. Explain meanings of fractions in binary.
b. Explain the difficulty of fixed-point representation in terms of bits allocated and rounding/
truncation errors.
c. Give an example showing magnitude (max/min of fixed-point form).
5. Introduce floating point in binary.
a. Give examples of representing decimal Floating point as binary, such as: 0 .1011 x 24 and
how to convert it to denary.
b. Point out both exponent and mantissa would be in 2s Complement and the decimal point is
not included in the hardware.
c. Show how to represent it for (say) 8 bit mantissa and 4 bit exponent EG:
d. Explain the normalised form of representation.
antissa Exponent
-1 . ½ ¼ 1/8 1/16 1/32 1/64 1/128 -8 4 2 1
0 . 1 0 1 1 0 0 0 0 1 0 0
6. Underflow and Overflow.
a. Give an example of word length (exponent/mantissa) and ask how you would calculate the
max and minimum numbers it could represent.
b. Overflow occurs when the result of a calculation is too large to be represented with the
available number of bits.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 41


c. Underflow occurs when the result of a calculation is too small, i.e., it is too close to zero, to
be represented with the available number of bits.
d. Explain when these situations could occur with calculations, and the consequence of errors.
e. Discuss the importance of errors when calculations are repeated in loops. Provide an
example to show how errors can propagate for example
(http://ta.twi.tudelft.nl/users/vuik/wi211/disasters.html).
i. An example of this occurred during the Gulf War with the American Patriot Missile
defence system. The system was programmed with 24 bits; therefore, when a
number was stored, it was truncated after 24 bits. However, this error caused the
Patriot Missile defence system to fail to detect an Iraqi Scud missile, which hit a
US Army barracks and killed 28 men.
ii. In 1996 when the Ariane 5 rocket created by Europe was set to make its first
flight. Less than forty seconds after take-off, the rocket exploded. The cause of
this explosion was a 64 bit number was incorrectly rounded into a 16 bit integer.
7. Summarise the key points of the session:
8. Tutorial Exercises:
a. Provide a graded set of exercises covering:
i. Converting binary floating point into denary. Include positive and negative
mantissa and exponent. For example:
Use 8 bits for the mantissa and 4 bits for the exponent.
FP value Answer
0101 0001 0111 exponent is +7
1 0101 0001 0111
0.101 0001 0111 mantissa is positive
Move decimal point forward seven places
0101 0001. = +81
1000 0100 0101 exponent is +5
2 1000 0100 0101
1.000 0100 0101 mantissa is negative
Find complement (swap all 1’s for 0’s and vice versa)
0111 1011
Add 1
0111 1100
Move decimal point forward five places
0111 11.00 = –31 (you have to remember to put the minus sign in!)
0110 0110 0101 exponent is +5
3 0110 0110 0101
0.110 0110 0101 mantissa is positive
Move decimal point forward five places
011001.10 = +25.5

ii. Ask students to read the section on Isaac CS on adding Floating point numbers and
work through an example.
https://isaaccomputerscience.org/concepts/data_numbases_floating_point?=&exam
Board=all&stage=all&topic=number_representation
iii. OPTIONAL Students may like to search for other disasters caused by computer
rounding errors.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 42


WEEK 7

Up to 2 hours may be needed to complete, plus homework


SLO Focus E1 Duration
time may be needed to complete this activity.

1. Explain that in this session the SLO is:


a. Explain how text, image and sound data are represented in a computer.
b. Recap on learning from last week: Short quiz, e.g.:
 Convert 10.7510 to standard form in decimal.
 Convert 10.7510 to normalised floating point form using 8 bits mantissa and 4 bits exponent.
 How do errors occur in floating point calculations?
c. Representing Text
a) Explain the need for encoding text, and the development of ASCII, originally 7 bits.
b) ASK what the limitations were.
c) Discuss the development of Unicode. Isaac Computer Science has a useful section, which you
could ask students to work through and complete the 4 questions at the end:
https://isaaccomputerscience.org/topics/text_representation?examBoard=all&stage=a_level
The section contains some useful videos.
d) EMPHASIZE the representation of digits as character codes. This is particularly important for
programming and often causes confusion.
d. Representing Sound
1. This section could be complex, but for this course students need to understand that sound
is essentially analogue, and thus needs to be converted to digital in order to be processed
by a computer. Explain:
i. The meaning of analogue and the nature of sound: Frequency and amplitude.
ii. To convert to digital, an Analogue to Digital Converter (ADC) samples the
signal at a particular rate (samples per second). Ask what impact this has on
quality and the data rate (bits per second) produced. Producing sound is
essentially the opposite process. (DAC).
iii. The sample resolution determines how accurately each sample reads the signal.
Ask what impact this has on quality and bits needed to represent it.
e) Discuss the calculation of Data Rate (bits per second) to transmit sound with a given sample
rate and resolution. Data Rate (bps)=sampling rate × sample resolution).
f) Discuss the storage needed to save an audio file. (storage requirements (in bits)=sampling
rate × seconds × sample resolution).
g) The following (IsaacComputerScience.Org, 2023) provides a good basis for discussion:
h) Eg: a sound file that has been optimised for standard CD quality, with a sampling rate of
44.1kHz (44100Hz) and a sample resolution of 16 bits.
i) Calculate the size of a sound file that is three minutes (180 seconds):
j) Storage requirements =44100x 16 ×180(seconds) = 127MB.
e. Summarise the key points of the session.
f. Tutorial Exercises:

© NCUK Ltd. 2023 IFY Computer Science TG v.1 43


a. See Handout EH2.
b. Answers:
i. Increasing the sampling rate.
1. This has increased the file size by around 11.2MB or 9%.
ii. Decreasing the sampling rate.
1. This has reduced the original file size of 127MB down by around 34.8MB
or 27%.
iii. Increasing the sample resolution.
1. This has increased the original file size of 127MB up by around 63.5MB
or 50%.
iv. Decreasing the sample resolution.
1. This has reduced the original file size of 127MB down by around 31.7MB
or 25%.
g. Independent study: Representing Images.
a. This is a relatively simple section. Essential knowledge is understanding of:
i. Bitmap graphics: Pixels, Colour depth, Resolution, calculating image size in bytes.
Image quality. Compression.
ii. The difference between vector graphics and bitmap graphics
b. Use handout EH2 as a research exercise for students to produce a brief summary of how
images are represented.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 44


WEEK 8

Up to 2 hours may be needed to complete, plus


SLO Focus E4 Duration homework time may be needed to complete this
activity.

The purpose of this session is limited to building awareness of the concepts of Boolean algebra,
knowledge of the symbols used and construction of truth tables. This is useful knowledge in the
context of computer science and particularly programming. Simplification of Boolean expressions,
Karnaugh maps and design of half / full adders are fun and interesting but not essential and may be
included as extensions if desired. Further enrichment can be provided through the use of the ‘Logic
gate simulator’ by Steve Kollmansberger. ( https://www.kolls.net/gatesim/ )
1. Explain that in this session the SLO is:
a. Construct truth tables for logical expressions.
2. Explain that the session today will explain the logic behind computer operation: Boolean logic, logic
statements and expressions, AND OR NOT NAND NOR, Precedence and Truth tables. It is also
relevant for the logic of programming. Point out that although it is the foundation of digital
computers, It was invented by George Boole (1815–1864), who demonstrated that all logical
relations can be expressed as a combination of AND, OR, and NOT operations. This was many
years before the digital computer.
3. Recap on learning from last week: Short quiz, e.g.:
a. A Python program reads data from a file starting at the beginning and working through one
byte at a time. What is the access method?
b. Which of these technologies is persistent storage?
i. RAM.
ii. Magnetic Tape.
iii. Flash drive.
iv. ROM.
c. Which of these technologies supports direct access.
i. RAM.
ii. Magnetic Tape.
iii. Flash drive.
iv. ROM.
4. Explain that Boolean algebra is a sub-area of mathematical algebra where the only values that can
be represented are TRUE or FALSE (1 or 0). Knowledge of Boolean algebra is fundamental in
programming and the design of modern digital equipment, and it is also used in set theory and
statistics.
5. Explain the idea of logic statements using AND OR NOT, for example ‘It is hot’, ‘it is sunny’. Truth
tables, precedence and introduction of variables are developed in
https://isaaccomputerscience.org/concepts/sys_bool_what_is_boolean_logic?examBoard=all&stage
=all&topic=boolean_logic.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 45


6. Explain logic gates, the mathematical notation and the symbols. There is always opportunity for
confusion given different notations. This course will accept any common notation. The following
are preferred:

Exclusive
Operation Conjunction Disjunction Negation
Disjunction

Logic gate

AND OR NOT XOR

Symbol A.B A+B 𝐀 AB

7. NAND and NOR should also be included.


8. Once the symbols and logic gates have been described, provide examples of:
a. Converting gate circuits into logic expressions and vice versa.
b. Drawing truth tables for simple logic expressions. Emphasize the usefulness of using
columns for intermediate results. For example, proof of distributive law:
A+(B.C) = (A+B).(A+C)

A B C B+C A.(B+C) A.B A.C (A.B)+(A.C)


0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0
1 1 0 1 1 1 0 1
0 0 1 1 0 0 0 0
1 0 1 1 1 0 1 1
0 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1

9. Summarise the key points of the session:


10. Tutorial exercises:
a. –See EH3 (Appendix) if unfinished continue for homework.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 46


WEEK 9

Up to 2 hours may be needed to complete, plus homework


SLO Focus E5 Duration
time may be needed to complete this activity.

1. Explain that in this session the SLO is:


a. Explain sequential and random-access file structures.
2. Recap on learning from last week: Short quiz, e.g.:
a. Determine the data rate needed to transmit a song recorded on a cd with sample of 16bits
and sample rate of 44.1 kHz.
b. Select the statement that correctly characterises bitmapped graphics.
i. Bitmapped graphics result in very small file sizes because they consist of sets of
instructions.
ii. Bitmapped graphics are suitable for digital photography because of the level of
detail that they can represent (correct).
iii. It is easy to adapt the shapes that appear on a bitmapped graphic because
bitmapped graphics allow access to each individual pixel.
iv. Bitmapped graphics are scalable, so they can keep their clarity when they are
enlarged.
(A-level question)
3. Explain the concepts of persistent storage and contrast it with RAM.
a. ASK for examples of secondary storage devices and the difference between them (Recap
from Topic A).
b. Explain the difference between serial / sequential access and Direct Access. Contrast SSD
with HDD and Optical and Magnetic Tape.
c. Explain the difference between text (e.g., Unicode data) and binary files (e.g., JPG image)
and how their contents can be viewed.
d. Explain the concept of organising file data in records.
e. Discuss file access methods in outline:
i. Sequential access.
ii. Direct access.
iii. Discuss relative advantages.
f. Point out that they will be writing programs in Python to sequentially access text files later
in the course.
4. Summarise the key points of the session.
5. Tutorial Exercises:
a. In pairs discuss the need for file security and ask what threats there are to data and how
these might be mitigated. Discuss how they secure their data on phone/ / PC etc. Expect
answers such as encryption, cloud backup (OneDrive/DropBox/Google Drive etc), flash
drive.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 47


WEEK 10
Coursework assignment Intro:
1. Provide students with clear guidance on what is expected from the assignment.
2. Discuss in class the nature of the task and what students are expected to do to fulfil the rubric.
3. Provide students with the NCUK assessment criteria for the coursework task.
4. Provide students with examples of how they might demonstrate each of the assessed skills.
5. Selecting a project,
a. Deliverables
b. Assessment
c. Grading criteria (rubric)
ii. Discuss exemplar coursework.
iii. Students produce a plan for the coursework task.
6. Students research and outline problem statement. (analysis)

© NCUK Ltd. 2023 IFY Computer Science TG v.1 48


TOPIC F – TYPES OF SOFTWARE AND
COMPUTER SYSTEMS
Key focus:

This topic builds on the previous knowledge of computer hardware to discuss software. It is a large topic
since it encompasses both system and application software. It starts with a discussion of how software
relates to hardware, the role of firmware and operating systems together with awareness of specialised
systems such as real-time and embedded systems. The major functions of a general purpose OS are
discussed followed by an outline of licensing and application software.
The final part of the topic aims to introduce modern developments, showing how pervasive and
widespread the impact of computer science has become. The focus of this section is therefore on the
application of computer science, showing how it has developed from stand-alone single user machines to
a globally interconnected web of services. One of the application areas that has gained most media
attention recently is AI, consequently it is important to introduce the concepts and how it fits into the
development of computer science.
The aims of this section are to:
 Explain the relationship of software to hardware and the role of Firmware, Device drivers, System
software, operating systems, utility software and application software.
 Explain the need for, and role of mobile, real time and embedded systems.
 Introduce and discuss contemporary and major application areas including AI (Artificial
Intelligence), Web, Mobile and Internet of Things.
The teaching is planned to take 7 (2 hour) sessions over a period of 8 weeks.

Specific Learning Outcomes for this topic:

F1 Analyse the need for, and attributes of, different types of software.
F2 Explain the key management tasks carried out by the Operating System.
F3 Explain the functions of application software.
F4 Describe the characteristics of a range of computer systems.

Previous Learning:

Students need to have studied computer hardware, architecture and logic, such as covered by topics A
and E.

Supporting Resources:

 Isaac Computer Science has very useful sections:


 FH1 (Research – Types of Software) Activity sheet - see Appendix A
 FH2 (Processor performance experiment using Python) - see Appendix A
 FH3 (Scheduling exercise) - see Appendix A
 FH4 (Software Licensing research exercise) - see Appendix A
 FH5 – Server Virtualization and Cloud Computing- see Appendix A

© NCUK Ltd. 2023 IFY Computer Science TG v.1 49


Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Firmware, operating system, virtual memory, page frame, page, page fault, Round Robin scheduling,
FIFO scheduling, Priority scheduling, process, interrupt, real time system, embedded system, Cloud
system, worldwide web, Artificial Intelligence, Internet of things, software license.

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 In pairs, students should write down definitions of key terms, exchanging those definitions with
other pairs for feedback.
 Give students a word search of key words from the lesson; they need to work out the word and
then write a definition for it (you can create word search using free software such as
https://sourceforge.net/projects/wsc/ ).

© NCUK Ltd. 2023 IFY Computer Science TG v.1 50


WEEK 11

SLO Focus F1 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to show the link between computer hardware and software,
demonstrating that the hardware provides a platform for the operating system, which in turn provides
a platform for the useful application software.
It is important that students are aware of specialised systems, such as real time and embedded
systems, the aim here is familiarity with the concepts rather than in depth knowledge.
1. Explain the Learning outcomes for the topic and that in this session the SLO is:
a. Analyse the need for, and attributes of, different types of software.
2. Recap on learning from last week: Short quiz, e.g.:
a. Convert this logic diagram into a Boolean expression and draw a truth table.

3. Explain that in the session today you will explore the different types of software and its
relationship to hardware and firmware.
a. You will be working in groups, conducting your own research to answer questions on the
tutorial exercise sheet FH1 and put together a short presentation.
b. Split students into groups and discuss the exercise on the handout, together with how to
get started on the research and time you will give them before presentations.
c. Discuss referencing and the importance of summarising in their own words.
4. Tutorial Exercises.
a. A useful way of promoting a more active learning approach for this topic is to set an
exercise for students to research the problem. Handout FH1 provides an activity for
students to work in groups to research, summarise and produce a short presentation,
present answers to a structured set of questions. You can require them to present a (say
PowerPoint) or provide a short report and then question them or get other students to
question them. A quiz (at the start of next session) can be used to check individual learning
since it is inevitable that students will use a divide and conquer approach to the research.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 51


WEEK 12

SLO Focus F1, F2 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to introduce the complexity involved in an operating system and the
principles behind process management. Students should be able to describe what is meant by process,
multi-tasking and outline descriptions of the standard scheduling algorithms and their relative
benefits/ uses.
1. Explain the that in this session the SLO is:
a. Explain the key management tasks carried out by the Operating System.
2. Explain that the session today will start to look at the details of operating systems. It will provide
an overview of OS function & structure Operating Systems: Processes/ scheduling.
3. Recap on learning from last week: Short quiz, e.g.:
a. A call centre has upgraded its company server so that the operating system allows each
user to sign in remotely and share the processor time. This allows hundreds or even
thousands of employees to access and share resources, including to run programs at the
same time. Which type of operating system the call centre has upgraded to:
i. Real Time
ii. Multi-Tasking
iii. Multi User
iv. Distributed
v. Embedded
b. Is it possible for a multi-user O/S to be multi-tasking?
c. Is it possible for a multi-tasking O/S NOT to be multi-user?
d. What is a device driver? Give an example.
e. What type of software is a device driver?
f. What type of software is Linux?
4. Initiate this session by asking what the purpose of an OS is, and what the 4 principal tasks are, they
should remember from last week’s exercise! There may be differences, different authors categorise
things slightly differently. The O/S typically also provides the UI, such as CLI or GUI. E.g., Security
could be included with file management, I/O as device management. Isaac uses the following:
a. Processor management
b. Inputs, outputs, and interrupts
c. Memory management
d. Security
5. Discuss, with presentation the following: Process management and scheduling.
a. What is a process?
b. Process scheduling – need for different methods in different types of OS

© NCUK Ltd. 2023 IFY Computer Science TG v.1 52


c. Discuss scheduling algorithms and their pros and cons. Ask which type of OS most likely to
use each. Discuss effect with small and large jobs.
i. Round Robin.
ii. First come first served.
iii. Shortest job first.
iv. Priority scheduling – and multi-level queues.
d. Point out the problem of one process overwriting another – need to have security between
processes.
6. Tutorial Exercises.
a. In one UK University (a very long time ago in the 1980s) students used an HP1000 multi-
user computer. Students discovered they could change the priority of their processes.
Guess what they did to get faster response? Eventually some students raised the priority
of their process above that of system processes. What do you think happened? (It hung).
b. Scheduling FH3 Solutions:
i. Round Robin CBA
ii. First come, first served ABC
iii. Shortest Job First ACB

© NCUK Ltd. 2023 IFY Computer Science TG v.1 53


WEEK 13

SLO Focus F2 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to explain the key principles of memory management in multi-tasking
systems. Students should be able to explain the problem of fitting multiple processes into RAM and
how this can be mitigated by dividing the RAM into page frames and process into pages, loading only
the pages needed. The complexities of working set and memory mapping are not explicitly discussed
at this stage (or examined) though students should be aware of the issues of page replacement.
1. Explain the that in this session the SLO is:
a. Explain the key management tasks carried out by the Operating System.
2. Explain that the session today will continue to look at the details of operating systems. It will
discuss how an operating system manages memory (RAM).
3. Recap on learning from last week: Short quiz, e.g.:
a. List 3 scheduling algorithms.
b. Which would be most suitable in a real time O/S?
c. A supermarket decides to schedule how it serves customers at a checkout. The person with
the fewest items in their basket is allowed to pay for their goods first (and push in the
queue). What consequences can you see (besides uproar in the queue?). What scheduling
algorithm is this?
4. Discuss, with presentation the following: Memory management.
a. Explain this refers to RAM, The O/S typically has a section of RAM permanently allocated
to it (Ask Why). The rest is used for user processes. Each process requires some memory.
b. Discuss an example such as: Given a situation where a computer has 2GB RAM and the OS
permanently uses 750 MB, and there are 4 processes that can run with the following
requirements.
i. A requires 500MB
ii. B requires 300 MB
iii. C requires 600 MB
iv. D requires 1.5GB
1. How would the computer deal with it? Would there be wasted space? How
would the processes be fitted in? Can D ever run?
c. Discuss inefficiency on memory use – programs often spend a lot of time in 1 area and
don’t use the rest of their process space very often. Can we make use of this fact. Also
fitting programs into memory can leave gaps (fragmentation).
i. Explain Paged memory (Page Frames) to remove fragmentation (what page size is
best? Why? Internal fragmentation: Windows & Linux use 4kB)
ii. Explain page file on secondary storage.
iii. Explain Demand paging and Page fault actions – what page to remove?
iv. Outline FIFO and LIFO policies as a contrast.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 54


5. Explain VM has been a standard feature of multi-tasking OS for decades. It enables efficient use of
RAM, and programs that require more RAM than physically available can run. It is a way of
maximising use of scarce resource (RAM and CPU time).
6. Summarise the key points of the session.
7. Tutorial Exercises
a. Consolidate and extend your learning on VM by watching the video:
https://www.youtube.com/watch?v=2quKyPnUShQ
i. What is the MMU?
ii. What’s meant by a virtual address? How is it different from a physical address?

© NCUK Ltd. 2023 IFY Computer Science TG v.1 55


WEEK 14

SLO Focus F2 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to discuss issues around I/O, file systems and security, to build
understanding of the problems of asynchronous devices – and some detail about interrupt processing.
Awareness is built of file management and different file systems, with an introduction to the problems
of file security and user authentication. Security is explored in more detail in a later topic.
1. Explain the that in this session the SLO is:
a. Explain the key management tasks carried out by the Operating System.
2. Explain that the session today will continue to look at the details of operating systems. It will
discuss how an operating system manages Input/Output, including file systems and security.
3. Recap on learning from last week: Short quiz, e.g.:
a. Describe the purpose of Virtual Memory in one sentence.
b. List TWO advantages of virtual memory.
c. If a page fault occurs does this mean the programmer has made an error?
d. If a program requires more RAM than is available in the physical memory, what happens in a
VM system?
e. What is the typical page size used by Linux and Windows?
i. Discuss, with presentation the following: Input/Output and Interrupts
ii. Discuss the issue of asynchronous I/O: An input device (eg keyboard) is sending
data to the computer, but the cpu is executing another process. What happens if the
cpu does not process the character before the user types another?
iii. Discuss solutions.
iv. Explain Interrupt principles
(https://isaaccomputerscience.org/concepts/sys_os_interrupts?examBoard=ocr&sta
ge=a_level&topic=operating_systems), saving process context and Interrupt Service
Routine (ISR).
v. Explain the concept of a buffer. An extension would be to discuss direct memory
access vs programmed I/O (but this is not examinable!)
4. Discuss File Management in outline:
a. Briefly explain that the O/S manages the file system too: The file access methods discussed
previously all make use of O/S services to create/read/amend/delete files. There are
different types of file systems, modern ones have security built in, including encryption and
the O/S keeps track of the file owner, the access permissions for different users and any
sharing.
5. Discuss User management and authentication (security)
a. Ensuring that resources are protected from unauthorised access through the use of
permissions and passwords.
b. Summarise the key points of the session.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 56


6. Tutorial Exercises:
a. Microsoft’s Windows operating system uses a file system called NTFS, which was
introduced to address the weaknesses of a previous file system called FAT32. Find out and
summarise the main advantages that NTFS has over FAT32. Are there any disadvantages?
b. Linux can have a variety of file systems. Find out which file systems it can use. Does this
include FAT32 or NTFS?

© NCUK Ltd. 2023 IFY Computer Science TG v.1 57


WEEK 15: COURSEWORK

1. Provide lesson time for students to work on their coursework.


2. Review and feedback on problem statement and plan.
3. Discuss next steps in coursework:
a. Requirement specification
b. Design of Solution:
i. Decompose the Problem.
ii. Describe the solution.
iii. Describe the approach to testing.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 58


WEEK 16

SLO Focus F3 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to explore application software and licensing, together with application
development software (which are often classified as utilities, though this is something of a grey area).
Students should be able to describe and provide examples of general purpose, special purpose and
bespoke application software, with their relative benefits. They should also be aware of the main
concepts of licensing (i.e., not ownership), distinguish open source from closed source software and
license types.
The role of IDEs should be discussed, and ideally demonstrate a couple. Depending on what has been
selected for the Python programming, IDLE could be contrasted with Pycharm and Eclipse.
1. Explain the that in this session the SLO is:
a. Analyse the need for, and attributes of, different types of software.
b. Explain the functions of application software.
2. Explain that the session today will continue to look at the need for, and types of application
software. It will also discuss the types of language translators and IDEs that are used for their
development. Finally, it is important to discuss licensing models.
3. Recap on learning from last week: Short quiz, e.g.:
a. An interrupt is a signal to the processor that a high-priority event has occurred, and
immediate action is required. To make this possible, the processor must stop what it is
doing and service the interrupt. Put the following steps in order to describe what happens
when the processor receives an interrupt.
i. Continue the original process.
ii. Restore the register values.
iii. Complete the FDE cycle.
iv. Service the interrupt.
v. Save registers to memory.
vi. Determine the ISR to run.
4. Application Software
a. Discuss what is meant by application software and distinguish 3 types: General purpose,
special purpose and bespoke. Students should be able to provide examples. Recap where
this fits in relation to operating systems and hardware.
b. Activity: A small catering company is looking for accounting software. The company performs its
administration on its in-house PC running Windows 11. Using the internet, research possible
candidate software applications. What disadvantages are there to installing the software on this
PC. What other options are there?
5. Application development Software.
a. Discuss the software used to develop applications, and the need to translate high level
languages to machine code. Translators are discussed in detail in Topic K. This topic
should position them in the context of other system software.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 59


b. IDE: Briefly discuss IDE facilities and popular ones such as Eclipse. The Python IDE used in
this course is simpler to aid learning and so has fewer facilities. Point out some IDEs can be
used for a variety of different languages.
c. Libraries, Link editors and loaders.
i. Explain, with reference to Python, the importance and function of libraries.
Illustrate with Python statements using for example the math library.
ii. Outline the function of link editor for combining compiled object code prior to
execution.
6. Open and Closed Source Software.
a. Ask what they know about open and closed source software.
b. Discuss the difference between these two models.
Open source Closed source
The source code is available The source code is not released
The software is usually free You may have to pay for a licence
to use the software
Anyone can make All changes are controlled by
modifications and contribute developers
to the development of the
software
Support is often provided by Support is provided by developers
users, rather than by
developers
7. Licensing models.
a. Ask whether when you ‘buy’ software you actually own it? Discuss that almost universally
you are purchasing a right to use it under a license. Typically, it’s an End-user license
agreement (EULA), which is a legal agreement granting a user a license to use an application
or software. It must be consented to before a user buys, installs, or downloads an
application or software owned by the service provider.
b. Point out that there are different types of Software License. Explain the major category of
proprietary (commercial) and Free/ Open-Source Licenses. Wikipedia has a concise table
showing the variation amongst sub-types.
https://en.wikipedia.org/wiki/Software_license#Free_and_open-source_software_licenses
8. Summarise the key points of the session.
9. Tutorial Exercises:
a. Students should complete Activity FH4 – see appendix

© NCUK Ltd. 2023 IFY Computer Science TG v.1 60


WEEK 17

SLO Focus F4 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to introduce modern developments, showing how pervasive and
widespread the impact of computer science has become. The focus is therefore on the application of
computer science, showing how it has developed from stand-alone single user machines to a globally
interconnected web of services. The technology of networks and the internet are included in a later
topic.
1. Explain the that in this session the SLO is:
a. Describe the characteristics of a range of computer systems.
2. Explain that the session today will discuss the topical subjects of distributed systems and the
Internet, Web, Mobile, Internet of Things, Cloud architecture.
3. Recap on learning from last week: Short quiz, e.g.:
a. Which of the following statements best describes what an interpreter does?
i. It syntax-checks each line of source code, halting when an error is found
ii. It syntax-checks the whole program, reports any errors, and then executes the
program.
iii. It syntax-checks the whole program and reports all the errors at the end of the
process.
iv. It syntax-checks each line of source code (halting if an error is found), and then
translates and executes the code one line at a time.
4. Discuss the development of computing from single process machine through to cloud. The
following notes may assist you. Inevitably it is simplified and there is some subjectivity in the
choice of seminal developments.
a. a single user (batch) system in the 1950s/1960s where the computer ran one job at a time,
through development of
b. Multi-user, multi-tasking O/S in the 1970s which could support relatively small numbers (a
few 10s) physically connected to the computer. For a laugh you could point out that dial-up
connections were possible in the late 1970’s at data rates of 1200 to 2400 baud (bps).
Compare that with gigabit fibre internet connections available today. ASK students to work
out the data rate/ bandwidth improvement – a factor of over half a million!
c. Whilst networking developed from the late 1970’s, and government and proprietary
networks existed in the 1980’s (the Internet’s official birthday is 1-Jan-1983) it is fair to say
that the development of the World Wide Web in the 1990s provided the most significant
boost since it enabled the development of a much larger range of services across the
Internet.
d. Web Services
(https://www.tutorialspoint.com/webservices/web_services_quick_guide.htm). Arguably one
of the most significant developments is the development of web services, which are defined
(simplified) as “any piece of software that makes itself available over the internet and uses a
standardized XML messaging system” (n.d.). Networks/Internet developed from systems to
transfer files/ emails/ web pages to systems where processes on one machine (client)

© NCUK Ltd. 2023 IFY Computer Science TG v.1 61


requested services from another (server) across the network/internet. It is difficult to
overestimate the impact of this distributed processing model. You no longer needed to have
programs on your local machine that did everything. Specialised processing could be done
remotely. This means that a local machine could be less powerful, the server(s) do most of
the work. An application can make use of many services, located anywhere on the planet.
This enabled truly distributed processing.
e. Multi-processing servers. To get the most out of this distributed system, servers must be
very powerful and service many clients. Alongside the developments in distributed systems,
hardware and operating systems were developing to provide that power. Manufacturers
produced multi-cpu machines, and operating systems were developed manage these multi-
cpu resources. Previously we discussed processes sharing one cpu. In these systems
processes can truly be executed in parallel.
f. Virtualisation. (https://www.techtarget.com/searchitoperations/definition/What-is-server-
virtualization-The-ultimate-guide) Virtual memory was explained earlier in this topic, where
disk space was used to provide ‘virtual’ additional memory. The next development is to
provide multiple virtual computers running on one powerful computer (and sharing its other
resources). If you were using one of these virtual computers (usually called Virtual
machines, or VMs), you are unaware of others. What’s more different VMs can run different
O/Ss’ So one could run Linux, another could run Windows Server. This has significant
benefits:
i. One large computer can replace several smaller ones (server consolidation) which
is more efficient.
ii. VMs can be reconfigured according to demand – give it more resources or less,
dynamically.
iii. VMs can be migrated from one hardware machine to another easily, in case of
problems.
iv. Cloud Computing
5. The development of powerful multi-processors, together with virtualisation to share their
resources and web services over the Internet has enabled a form of computing now known as
Cloud computing.
6. Google define it as follows “Cloud computing is the on-demand availability of computing
resources (such as storage and infrastructure), as services over the internet. It eliminates the need
for individuals and businesses to self-manage physical resources themselves, and only pay for
what they use”.( https://cloud.google.com/learn/what-is-cloud-computing#section-2)
7. Cloud can be categorised in several ways. From the point of view of a Computer Science course,
these are particularly useful:
a. Infrastructure as a service (IaaS)
i. Infrastructure as a service (IaaS) offers on-demand access to IT infrastructure
services, including compute, storage, networking, and virtualization. It provides
the highest level of control over your IT resources and most closely resembles
traditional on-premises IT resources. Basically, you have access to a VM and have
to do everything (O/S, applications etc yourself).
b. Platform as a service (PaaS)
i. Platform as a service (PaaS) offers all the hardware and software resources needed
for cloud application development. With PaaS, companies can focus fully on

© NCUK Ltd. 2023 IFY Computer Science TG v.1 62


application development without the burden of managing and maintaining the
underlying infrastructure.
c. Software as a service (SaaS)
i. Software as a service (SaaS) delivers a full application stack as a service, from
underlying infrastructure to maintenance and updates to the app software itself. A
SaaS solution is often an end-user application, where both the service and the
infrastructure is managed and maintained by the cloud service provider. For
example, Microsoft 365 office, Google Drive.
d. Thus, Computer science has facilitated the development from isolated single application
machines to global access to computing power that can be scaled on demand, combining
services from anywhere on the planet.
8. Demonstration (or exercise)
a. A useful exercise if the facilities are available is to demonstrate a simple form of
virtualization using Virtual Box. https://www.virtualbox.org/ .
9. Installing a Linux distribution can show how it can be used, even on a relatively low power PC.
10. Summarise the key points of the session.
11. Tutorial Exercises:
a. Handout FH5 has exercises to read and summarise articles on Virtualization and Cloud.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 63


WEEK 18

SLO Focus F4 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to introduce students to basic AI concepts since it is one of the
application areas that has gained most media attention recently and is likely to have a profound
influence on our society.
There are useful resources on the website: https://www.futureoftech.org/artificial-intelligence/
including videos and lesson plans. For example, a simulation exercise about facial recognition and
probabilistic reasoning. https://www.futureoftech.org/assets/documents/FoT_Lesson_Plan-
Artificial_Intelligence.pdf
1. Explain the that in this session the SLO is:
a. Describe the characteristics of a range of computer systems.
2. Explain that the session today will discuss the topical issue of Artificial Intelligence (AI), including
ChatGPT, Bard.
3. Recap on learning from last week: Short quiz, e.g.:
a. What is the difference between SAAS and IAAS?
b. In which of the models does the client manage O/S, Applications and Data?
c. In which of the models does the client manage Applications and Data?
d. A small business requires an accounts package. Rather than purchase a license and install
on their own machine, they decide to use one that is already on the cloud. Which model of
cloud is this? What are the advantages and disadvantages to the business?
4. Explain that AI has been an application area of computer science since 1950’s, Alan Turing in 1950
wrote about machine intelligence and proposed what is known as the ‘Turing test’ (can a human
distinguish whether it is talking to a machine or a human), though the term “artificial intelligence” is
usually attributed to John McCarthy.
5. Ask Students what they think is meant by AI and collect on the board.
6. Discuss the ‘definition’ attributed to Marvin Minsky: “The science of making machines do things that
would require intelligence if done by men.” Point out that this is quite vague – what is intelligence? It
means that the field is extremely large.
7. Discuss some comparisons and areas of study in AI, showing the breadth of the subject.

Human Intelligence AI
Speak / communicate Speech recognition
Read and Write Natural Language Processing
See and Recognise Computer vision/ recognition
Move Robotics
See Pattern Pattern Recognition
Cognitive Ability Machine Learning
8. Discuss that we can summarise key characteristics of AI

© NCUK Ltd. 2023 IFY Computer Science TG v.1 64


a. Reasoning- The ability to solve problems through logical deduction. Enhance by adding new
knowledge or adjusting (learning). Allow inexact reasoning.
b. Knowledge- The ability to present knowledge about the world.
c. Planning- The ability to set and achieve goals.
d. Communication- The ability to understand spoken and written language.
e. Perception- The ability to infer things about the world via sounds, images, and other
sensory inputs.
9. Show some videos or images of AI application in fields such as healthcare, finance, facial
recognition, chatbots, self-driving cars.
10. The activity in futureoftech lesson plan could be used here.
11. Ethics of AI: Discuss the ethical implications of AI such as piracy, bias, job displacement. What are
the students’ opinions? Handout FH6 provides a short summary of the Risks of AI.
12. Summarise the key points of the session:
13. Tutorial Exercises
a. Ask how many have used ChatGPT or Bard?
b. Experimenting with ChatGPT and Bard
i. Split students up into pairs, some use Bard (https://bard.google.com/?hl=en) and
some use ChatGPT https://chat.openai.com/auth/login)
ii. Provide suggestions to try. – maybe about learning about AI.
iii. Ask them to research how the chatbots work.
iv. Discuss the college policy on use of these bots.
b. Python and AI
c. For those interested in going further W3Schools has an introductory course
https://www.w3schools.com/python/python_ml_getting_started.asp

© NCUK Ltd. 2023 IFY Computer Science TG v.1 65


TOPIC G – DATA TYPES AND STRUCTURES
Key focus:

This topic follows directly from Topic B sessions on loops. After a recap of types and type casting it
starts with the simple compound types of String and Array. It is important to introduce the concept of an
array since it is pervasive in computer science. This course will use Python Lists since they provide the
features we need (and more), rather than import the Array module. Since the intent of this course is to
teach generalized programming concepts and practice, it is recommended that the more esoteric
language functions are not emphasized.
The remainder of the topic explains other abstract data types (ADT) and programming exercises that use
them, integrating computer science theory with programming practice.
The aim of this topic is to explain the concepts of compound data types / ADTs and their operations,
together with practical experience of programming them.
It is envisaged that the topic will require 5/6 sessions of 2 hours per week.

Specific Learning Outcomes for this topic:

G1 Use casting to change the type of variables in expressions.


G2 Explain and write a program making use of strings and string formatting in python.
G3 Explain and write a program making use of a list in python.
G4 Describe, with diagrams, the structure of an array, tuple, list, linked list, binary tree, stack and
queue, their operations and in what circumstances they are likely to be used.

Previous Learning:

Students will be expected to have knowledge of Topic B.

Supporting Resources:

 https://isaaccomputerscience.org/topics/data_structures?examBoard=ocr&stage=a_level section
on data structures
 The official Python site. https://www.python.org/
 https://pynative.com/python/quizzes/
 https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
 Kalb, I. (2018) Learn to Program with Python 3: A Step-by-Step Guide to Programming, Apress.
 Wentworth et al. (2012) How to Think Like a Computer Scientist: Learning with Python 3,
https://openbookproject.net/thinkcs/python/english3e/
 W3Schools Python tutorial: https://www.w3schools.com/python/
 GH1 –Lab exercises – see Appendix A
Key vocabulary and structures:
Students should be able to define and, where appropriate, provide examples of the following:
 String, List, ADT, Tuple, Array, Stack, Queue, Binary Tree.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 66


How teachers could check students’ understanding of key concepts; common errors to look out
for:

 Create a word search with key terms. Students find the terms and write down definitions for each one.
 Monitor students’ progress in programming exercises.

Common misunderstandings:

 Students commonly have problems with references (pointers) since these are hidden from view, and
it is not obvious whether two variables point to copies or reference the same object. It is important
when it comes to comparison, and (somewhat counter-intuitively) is probably easiest to explain with
function parameters (call-by-reference)

© NCUK Ltd. 2023 IFY Computer Science TG v.1 67


WEEK 13

SLO Focus G1, G2 Duration Up to 2 hours may be needed to complete activity.

This session introduces the topic of data types and structures, revisits the concepts of simple type and
type casting. The idea of compound type and Abstract Data Type are introduced and the majority of
the session is focussed on programming with strings. One complexity to emphasise is the meaning of a
variable in the context of string (and ADT in general), and the concept of a reference (pointer). Time
spent discussing it here will be well worth it.
Strings are taught systematically in Kalb Chapter 8 and Wentworth chapter 6
1. Explain the Learning outcomes for the topic, and that in this session the SLOs are:
a. Use casting to change the type of variables in expressions.
b. Explain and write a program making use of strings and string formatting in python.
2. Explain that in this session students will be able to:
a. Explain, with examples the terms data type, simple (primitive) type, compound data type,
abstract data type, data structure.
b. Write Python programs to process strings in a variety of ways.
3. Recap on previous week and relate current session to the overall module schedule.
a. Data Types: Introduce the multiplicity of terms, a diagram showing relationships can be
useful.
https://isaaccomputerscience.org/concepts/dsa_datastruct_definitions?examBoard=ocr&st
age=a_level&topic=data_structures has brief definitions which are useful.
4. Ask students to define the concept of data type, now they have experience of using them. Ask for
Python’s simple data types. Emphasize that a simple (or primitive) data types represent a single
value – no sub-parts, it also includes operations to manipulate it, eg int has +,- etc. A data type
with sub-parts is a compound (or composite) type.
5. Ask students what compound types they’ve use – should bring out a string.
6. Explain Data Structures: Explain that the term data structure is commonly used to mean a
collection of data that is organised to allow efficient processing: technically a string is a data
structure. The key point is that it is an implementation.
7. Explain ADT: a conceptual (mathematical) model that describes how data is organised and which
operations can be carried out on the data independent of an implementation. Eg we can talk about
strings and operations without ever knowing how they are stored in memory. So a data structure
is the implementation of an ADT on a computer.
8. Type conversion and casting:
a. Recap on the concept and practice of type casting. Ask what can and cannot be cast. Point
out that since Python has untyped variables, it becomes particularly important.
9. Strings in Python and the operations on them. Discuss and demonstrate the following:
a. A string is both a compound type but also called an object in python. The operations are
known as methods.
b. Strings as single things - e.g. the upper() method, comparison of whole strings.
c. Working with parts of strings: explain:
© NCUK Ltd. 2023 IFY Computer Science TG v.1 68
i. Use of the index to obtain a character, index values
ii. Length (len) function
iii. Using loops (While/ for) to process the string char by char
iv. slicing to obtain substring with examples
v. split method
vi. membership (in)
vii. find() function
d. String variables:
10. Discuss what a string variable holds: a reference (pointer) to a string.
11. ASK whether strings which appear to have the same value are copies or point to the same object
(give example/ diagram). Point out that Python optimises to the same object.
12. Emphasize this idea of a reference is important and will crop up again many times.
a. Summarise the key points of the session.
13. Tutorial Exercises:
a. Handout GH1 suggests some exercises from Wentworth Chapter 6.
14. Portfolio Exercise.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 69


WEEK 14

SLO Focus G3, G4 Duration Up to 2 hours may be needed to complete activity.

This session focusses on Arrays and Lists, using Python lists as implementations of the Array ADT.
You may consider elaborating the content by discussing the import of the Python Array module but it
is not examinable. https://docs.python.org/3/library/array.html The content is described in Kalb
Chapter 7 and Wentworth Chapter 11
1. Explain that for this session the SLOs are:
a. Explain and write a program making use of a list in python.
b. Describe, with diagrams, the structure of an array, tuple, list, linked list, binary tree, stack
and queue, their operations and in what circumstances they are likely to be used.
2. Explain that in this session students will be able to:
a. Explain, with examples the terms array and list
b. Write Python programs to process lists in a variety of ways.
3. Recap on previous week and relate current session to the overall module schedule. To reinforce
the learning of terms in the last session, start by asking students to write down brief definitions of
the following, with example.
a. Primitive data type
b. Composite data type
c. Abstract Data Type (ADT)
d. Data structure

4. Introduce the concept of an array


(https://isaaccomputerscience.org/concepts/dsa_datastruct_array?examBoard=ocr&stage=a_level)
and its definition, using a diagram to show the index:
a. An array is defined as a data type that is used to store elements in consecutive memory
locations (RAM) and refers to them by an index. All elements are the same type. The array
has a single identifier.
b. Draw out the similarity between a string and a (1-d) array.
c. Show that there can be 2 dimensional (or more) arrays, with 2 indices to select an element.
d. It takes the same time to access any element, we say this is of order 1: O(1) in big-O
notation.
e. Arrays make processing of certain collections of data fast and easy, using loops.
5. Python Lists.
a. Explain Python has built in data type (List) which exhibits almost the same properties as an
array, so we will use these to illustrate arrays. You need to know both terms.
6. Explain, with examples (such as those in Wentworth) the following points about a List.
a. Defining a list and assigning values

© NCUK Ltd. 2023 IFY Computer Science TG v.1 70


b. Point out that Python allows list elements to be of different type: This is a difference from
an array, where they are all the same type.
c. Equivalent of 2-d array is a list with elements that are lists. Give example
d. Accessing list elements
e. Operations: concatenation, membership, slicing, updating/ deleting elements (unlike strings)
f. List references – what the ID points to, assignment, contrast with strings.
g. Lists as function parameters – call by reference: give example showing overwriting; Ask
what the program does:
def dbl(myList):
i=0
while i < len(myList):
myList[i] = myList[i] *2
i=i+1
return 0

theList= [1,2,3,4]
x = dbl(theList)
print(theList)
h. Cloning – making a copy rather than copying the reference.
i. Functions that produce lists as return values – give example.
j. The FOR loop and lists – some neat code.
k. List methods: .append, .sort .reverse .remove. Note none of these are standard Array
methods.
7. Summarise the key points of the session.
8. Tutorial Exercises:
a. Handout GH1 includes List exercises, mostly from Wentworth.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 71


WEEK 15

Formative Coursework Assessment


1. Provide lesson time for students to work on their coursework.
2. Review and feedback on problem statement and plan.
3. Discuss next steps in coursework:
a. Requirement specification.
b. Design of Solution:
i. Decompose the Problem.
ii. Describe the solution.
iii. Describe the approach to testing.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 72


WEEK 16

SLO Focus G4 Duration Up to 2 hours may be needed to complete activity.

This session focusses on tuples, the content is described in Kalb Chapter 11 and Wentworth Chapter
9. The new content is short, and this leaves plenty of time for consolidation of previous week’s
exercises, portfolio work and coursework.
1. Explain that for this session the SLO is:
a. Describe, with diagrams, the structure of an array, tuple, list, linked list, binary tree, stack
and queue, their operations and in what circumstances they are likely to be used.
2. Explain that in this session students will be able to:
a. Explain, with examples the term tuple.
b. Write Python programs to process tuples in a variety of ways.
3. Recap on previous week and relate current session to the overall module schedule. To reinforce
the learning of terms in the last session, start with a short quiz, for example:
a. Define an array, give 3 characteristics of an array.
b. Identify one difference between a Python list and an array.
c. What will the following code produce? (From Wentworth 11.9)

i. >>> a = [1, 2, 3]
ii.>>> b = [1, 2, 3]
iii.>>> a == b
d. Are a and b pointing to the same memory locations containing the list values?
e. What will the following code produce?

i.>>> a = [1, 2, 3]
ii. >>> b = a
4. Introduce the concept of a tuple and its definition, using a diagram.
https://isaaccomputerscience.org/concepts/dsa_datastruct_tuple?examBoard=ocr&stage=a_level.
Draw the parallel with file records.
5. Explain the following features, with examples:
a. Defining tuples.
b. Assigning tuples.
c. Returning tuples from functions.
6. Summarise the key points of the session.
7. Tutorial Exercises:
a. Handout GH1 includes Tuple exercise.
8. Portfolio exercises.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 73


WEEK 17

SLO Focus G4 Duration Up to 2 hours may be needed to complete activity.

This session focusses on Queues, the content is described in Wentworth Chapter 26 as an object-
oriented class. It is suggested that it is not used, and that the queue functions are developed in
Python using a list and the built in methods/functions.
1. Explain that for this session the SLO is:
a. Describe, with diagrams, the structure of an array, tuple, list, linked list, binary tree, stack
and queue, their operations and in what circumstances they are likely to be used.
2. Explain that in this session students will be able to:
a. Explain, with examples the term queue.
b. Write Python program to implement it.
3. Recap on previous week and relate current session to the overall module schedule. To reinforce
the learning of terms in the last session, start with a short quiz, for example:
a. Write code to declare a variable t which references a tuple containing a name, and list of
phone numbers.
b. Modify it so that the list of phone numbers is a list of tuples containing ‘work’, ‘home’,
‘mobile’ and corresponding numbers.
4. Introduce the concept of a queue (FIFO)
(https://isaaccomputerscience.org/concepts/dsa_datastruct_queue?examBoard=ocr&stage=a_level
&topic=data_structures) and its definition, using a diagram.
a. Reinforce that it is an ADT with the following operations:
enqueue(data) add an element to the queue
dequeue() return an element from the front of the queue
is_empty() check whether the queue is empty
is_full() check whether the queue is at maximum capacity
b. Develop algorithms for these operations in any of Structured English, Pseudocode or
flowchart.
5. Implementation:
a. Discuss the implementation as a list in Python, and discuss with the class the methods and
operations built into Python that will help (e.g. len(), append, and pop) for each of the
operations. Demonstrate looking up the methods available for the List object.
b. Develop code interactively.
c. Discuss examples where a queue is used. For example:
i. Print tasks are stored on a print queue while waiting to be printed. When a set of
tasks are waiting to be executed, a priority queue will be used to ensure that they
are executed in the appropriate order.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 74


ii. Simulations often make use of queues. A simulation for a proposed road scheme
could model the behaviour of traffic queueing at junctions. A supermarket
simulation could model the waiting times for customers queuing at a checkout.
6. Optional extension:
a. Discuss priority queues and implementation.
7. Summarise the key points of the session.
8. Tutorial Exercises:

a. Handout GH1 includes a queue exercise.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 75


WEEK 18

SLO Focus G4 Duration Up to 2 hours may be needed to complete activity.

This session focusses on Stacks, the content is described in Wentworth Chapter 25 as an object-
oriented class. It is suggested that this is ignored and implemented using Python lists.
1. Explain that for this session the SLO is:
a. Describe, with diagrams, the structure of an array, tuple, list, linked list, binary tree, stack
and queue, their operations and in what circumstances they are likely to be used.
2. Explain that in this session students will be able to:
a. Explain, with examples the term stack.
b. Write a Python program to implement it.
3. Recap on previous week and relate current session to the overall module schedule. To reinforce
the learning of terms in the last session, start with a short quiz, for example the following A-level
question:
The following diagram is an abstraction of a linear queue.

The front pointer (black) points to the start of the queue. The rear pointer (pink) points
to the end of the queue.
Dan is at the front of the queue in position 0.
The following names are enqueued in the order given:
a. Adam
b. Sasha
c. Mohammed
d. Jay
a. To which position will front point after all the names have been enqueued?
b. To which position will rear point after all the names have been enqueued?
c. Which position will Mohammed occupy after all the names have been enqueued?
4. Introduce the concept of a Stack (LIFO) and its definition, using a diagram.
https://isaaccomputerscience.org/concepts/dsa_datastruct_stack?examBoard=ocr&stage=a_level
a. Reinforce that it is an ADT with the following operations:

push(data) adds an element to the top of the stack

pop() removes an element from the top of the stack


peek() returns a copy of the element on the top of the stack without
removing it

© NCUK Ltd. 2023 IFY Computer Science TG v.1 76


is_empty() checks whether a stack is empty

is_full() checks whether a stack is at maximum capacity when stored


in a static (fixed-size) structure
b. Develop algorithms for these operations in any of Structured English, Pseudocode or
flowchart. Emphasize the role of the stack pointer.
5. Implementation:
a. Discuss the implementation as a list in Python and discuss with the class the methods and
operations built into Python that will help for each of the operations.
b. Develop code interactively.
c. Demonstrate use of a trace table to show what is happening when functions are called.
d. Discuss examples where a stack is used. For example,
i. To maintain a list of operations for an 'undo' function in a piece of software, where
the most recent operation is the first to be undone.
6. Summarise the key points of the session.
7. Tutorial Exercises:
a. Handout GH1 includes a stack exercise.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 77


WEEK 19

SLO Focus G4 Duration Up to 2 hours may be needed to complete activity.

This session focusses on Binary Tree, the content is described in Wentworth Chapter 27 as an object-
oriented class. It is suggested that it is not used, and that the material from
https://isaaccomputerscience.org/topics/data_structures?examBoard=ocr&stage=a_level is used to
develop concepts in a theoretical way. Linked lists are introduced to lead to the concept of tree, and
pointer. The term graph needs to be defined since a tree is normally defined in terms of a graph, and
students could come across it.
Pseudocode is useful to explain algorithms and it is a good opportunity to introduce optional advanced
topics such as recursion and reading/ tracing a coded example of search in python.
1. Explain that for this session the SLO is:
a. Describe, with diagrams, the structure of an array, tuple, list, linked list, binary tree, stack
and queue, their operations and in what circumstances they are likely to be used.
2. Explain that in this session students will be able to:
a. Explain, with examples the terms linked list, binary tree.
3. Recap on previous week and relate current session to the overall module schedule. To reinforce
the learning of terms in the last session, start with a short quiz, for example:
a. The following statements, in structured English, form the algorithm for the pop operation
on a stack. Put them into the correct order. You do not need to indent any of the
statements.
i. Check if stack is empty.
ii. Decrement stack pointer by 1.
iii. Else return the data item indexed by the stack pointer.
iv. If stack is empty display error and return.
4. Introduce the concept of a Linked List, using a diagram.
https://isaaccomputerscience.org/concepts/dsa_datastruct_linked_list?examBoard=ocr&stage=a_le
vel&topic=data_structures
a. Explain the use of pointers (reference) to link the nodes together, end pointer = null and a
head pointer to the start.
b. Develop algorithms for insert node, delete node operations in any of Structured English,
Pseudocode or flowchart.
c. Point out they are useful for keeping chains of related information, especially in order.
There may be more than one pointer, e.g. back forward.
5. Introduce the concept of a Binary Tree using a diagram.
https://isaaccomputerscience.org/concepts/dsa_datastruct_tree?examBoard=ocr&stage=a_level&t
opic=data_structures
a. Point out that a tree is a more specialised form of what mathematicians call a graph, though
is essentially a mesh network. It consists of nodes and edges (links).

© NCUK Ltd. 2023 IFY Computer Science TG v.1 78


b. A tree is a connected, undirected graph with no cycles. Explain the significance of the bold
terms.

c. Distinguish a binary tree from a generalised tree.


6. Define terms using examples:
a. Node, Root, Leaf, Branch, parent, child. There are some useful diagrams on
https://isaaccomputerscience.org/topics/data_structures?examBoard=ocr&stage=a_level
b. Discuss applications for binary trees.
i. Used in compilers to build syntax trees.
ii. Used within routers to store routing tables.
c. Binary search trees can be built to speed up searching – explain how this works with a
diagram. Develop an example of adding data into an ordered form and then search.
i. Demonstrate speed of search compared to a linear list.
d. Expression trees can be used to represent algebraic and Boolean expressions in a way that
simplifies the processing of the expression.
7. Implementation:
a. Discuss the implementation using pointers and compare with linked lists. Emphasize the
power of using pointers. OPTIONAL develop algorithms in structured English/ pseudocode,
this is a good opportunity to introduce recursion (option).
8. Summarise the key points of the session.
9. Tutorial Exercises:
a. Handout GH1 includes a Binary tree exercise.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 79


WEEK 20 - COURSEWORK

1. Provide lesson time for students to work on their coursework.

2. Review and feedback on Design (models) and plan.


3. Discuss next steps in coursework:
a. Development of solution (implementation)
b. Test plan and testing

© NCUK Ltd. 2023 IFY Computer Science TG v.1 80


TOPIC H – NETWORKS AND
COMMUNICATIONS
Key focus:

Data communications and networking is an immense subject. In the short time available here, the topic
focusses on the following threshold concepts:
 Packet switching and addressing.
 Need for standards and protocols. Protocol layering.
Building on those concepts, students need to be able to define and differentiate between LAN and WAN,
understand in outline the TCP/IP stack, IP addressing, The Internet, DNS and examples of application
layer protocols such as HTTP, POP3, SMTP, HTTPS. Students should also be able to describe the
hardware components needed to connect equipment together (NIC, Switch, Router) and the need for a
firewall. Security should be mentioned but given its importance (and that it is not limited to networking),
it is a topic in itself.

Specific Learning Outcomes for this topic:

H1 Explain the purpose of a network and differentiate a LAN from a WAN.


H2 Describe the terms networking standard and networking protocol and why they are needed.
H3 Explain the need for addressing in networks, including network number and node number.
H4 Outline the key features of the Internet and the role of DNS.

H5 Distinguish between a switch, router and firewall and describe their principal functions.
H6 Compare and contrast a client server and peer to peer network.

Previous Learning:

Students are expected to have understanding of the concepts of bit, byte and computer I/O.

Supporting Resources:

There are lots of resources available for computer networking. The difficulty is selecting those that focus
on key concepts and are not diverted by historical anomalies like Token Ring.
 Isaac Computer Science

Key vocabulary and structures:

 Students should be able to define and, where appropriate, provide examples of the following: LAN,
WAN, bandwidth, protocol, TCP/IP, IP address, MAC address, DNS, Network Interface Card,
Switch, Wireless Access Point, Router, Firewall, The Internet, UTP, ISP, DHCP

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 In pairs, students should write down definitions of key terms, exchanging those definitions with
other pairs for feedback.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 81


 A Computing version of the “Taboo” game.
https://en.wikipedia.org/wiki/Taboo_(game)#:~:text=well%20as%202012.-
,Rules,which%20may%20not%20be%20spoken. (teams of 2, groups of 4) Keywords are written
one per card, together with definition and a set of associated terms that cannot be used (taboo
words). Players are in teams of two; in their turn a player attempts to prompt their teammate to
guess the keyword by describing it but not using it or the associated (taboo) words. Each player
has an allotted time. The winning team is that with the most correct guesses. It helps students
think and articulate the meaning of terms. A great revision exercises.

Common misunderstandings:

 The topic is full of acronyms. A student glossary is an excellent idea; students can add terms that
are unfamiliar to them and define them in their own words.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 82


WEEK 19 LECTURE-TUTORIAL

H1, H2,
SLO Focus Duration Up to 2 hours may be needed to complete activity.
H3, H5

The purpose of this session is to introduce the threshold concepts of computer networking and
introduce the technology for achieving networking in modern systems.
1. Explain the that in this session the SLOs are:
a. Explain the purpose of a network and differentiate a LAN from a WAN.
b. Describe the terms networking standard and networking protocol and why they are needed.
c. Explain the need for addressing in networks, including network number and node number.
2. Explain that the session today will start to look at the concepts and technology of networking in
general and the Internet in particular. We use networks every day, they are critical to the modern
world. This topic explains HOW they work.
3. The Isaac Computer Ccience resources (links) below introduce and define terms with examples and
provide short videos which you may wish to use either in class or as directed study.
a. Network fundamentals
https://isaaccomputerscience.org/topics/networking?examBoard=all&stage=all
b. The internet
https://isaaccomputerscience.org/topics/the_internet?examBoard=all&stage=all
c. Network hardware
https://isaaccomputerscience.org/topics/network_hardware?examBoard=all&stage=all
d. Communication
https://isaaccomputerscience.org/topics/communication?examBoard=all&stage=all
4. It is important to be selective as the detail can be confusing, and the aim is to explain the key
concepts and technology. It is always useful to ask questions to elicit students’ current level of
understanding. The suggested order is:
a. What is a network? - use diagrams to show interconnected devices, it doesn’t matter what
topology. Introduce the term node (and synonym host).
b. How do networks send data to a particular node? Introduce the idea of a packet and
address. Analogies with the postal system are useful here. Emphasize the need for
standardisation so that addresses are understood by all devices. (C.f. postcode). Introduce
& define the concept of protocol. Asking students the protocol for sending a letter or
parcel, giving examples of local cultural protocols reinforces the concept.
c. Discuss the idea of layered protocols, and link it to the concept of abstraction (hiding
detail): Again, the postal service is useful e.g.: sending a letter/ parcel internationally
doesn’t affect the sender (other than cost). How the post office gets the letter/parcel to the
destination is invisible and doesn’t matter. It may be by road, rail, air. Point out an address
is layered, with local street name/number and area/city, and country.
d. Emphasize these are the critical threshold concepts for networking: Packets/ Addresses/
Standardised protocols/ layered protocols. They underpin everything in computer
networking.
5. LAN - Basic Network Technology. It is useful and simplest to start off with LAN addressing (MAC)
and technology. Ethernet is in such common use that it is worth discussing it briefly. There is little

© NCUK Ltd. 2023 IFY Computer Science TG v.1 83


benefit in discussing token ring or even bus, even if the physical star is a logical bus. Similarly keep
the devices simple: NIC and switch in a star. The following is suggested:
a. Explain the Local Area Network (LAN) is limited range, but the main point is it has one layer
of address: the MAC address. This is often known as the physical address: 48 bits allocated
by manufacturer of the NIC. Every device on a network must have an NIC. Give example,
running Ipconfig/all on a PC in command line window can show all the adapters and their
addresses.
b. Introduce switch as a device and explain its function in sending packet (technically called a
frame at L2) to correct destination along a cable (called UTP – Unshielded Twisted Pair).
Point out it learns where they are.
c. Explain that in Wi-Fi a device known as an access point does essentially the same thing,
with the extra complexity that it uses radio signals instead of dedicated wires, so there can
be interference. At home your Wi-fi router includes the functionality of an access point.
d. Explain that the MAC address (IEEE 802 standard) originally was developed by DEC/Intel
and Xerox in the Ethernet LAN standard, the term Ethernet is still used to describe the LAN
protocols on wired networks.
e. Point out that there are limits to a LAN, it cannot span the world because of technical
limitations and single layer addressing. The answer is to connect LANS (networks) together.
6. WAN: Introduce the idea of WAN as a way of interconnecting networks since these days this is
essentially what it is. Introduce the Mesh topology and explain that there needs to be an address
for the network as well as the node (host) within the network: Discuss analogy of postal service
again, LAN = in a location, WAN = internationally.
a. Emphasize the 2-part address Network/Host. This is how the Internet address works, an IP
address. Point out that there are private corporate WANS, but most these days will still use
IP addressing.
b. Discuss the problem of sending packets to destination across a mesh network (routing) and
the need for routers to have routing tables to decide where to send the packet. Point out
this is not trivial, routes are different lengths/ speed/ technologies (e.g., microwave, fibre,
satellite). There can be many routes to the destination.
c. Explain the relationship between MAC address and IP address, the need for the router to
convert MAC to IP on way out of LAN and IP to MAC on way in.
d. Emphasize that the IP address is at a different layer to the MAC address (like postal
addresses).
e. Introduce the Internet and its backbone core routers/ enterprise and ISP routers.
7. Summarise the key ideas: Networks need:
a. Packet switching and addressing.
b. Addressing can be single MAC address in LAN, must be 2- part (IP address) in WAN.
c. NIC + Switch connect hosts/nodes in LAN. Routers connect networks in WAN.
d. Internet is a WAN, core backbone routers, ISP routers, subscriber routers.
e. None of this could work without agreed protocols and standards. Protocols are layered for
simplicity and so different ones ‘can be plugged in’ E.g., different protocol for fibre to the
premises than ADSL.
8. Tutorial exercises:

© NCUK Ltd. 2023 IFY Computer Science TG v.1 84


a. Select parts of the networking materials from Isaac Computer Science and ask students to
complete
b. Handout HH1 includes example questions

WEEK 20: COURSEWORK TUTORIAL

1. Provide lesson time for students to work on their coursework.


2. Review and feedback on Design (models) and plan.
3. Discuss next steps in coursework:
a. Development of solution (implementation)
b. Test plan and testing

© NCUK Ltd. 2023 IFY Computer Science TG v.1 85


WEEK 21 LECTURE-TUTORIAL

SLO Focus H4, H5, H6 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to explain the Internet, IP addressing, DNS and identify some of its
protocols.
1. Explain the that in this session the SLOs are:
a. Outline the key features of the Internet and the role of DNS.
b. Distinguish between a switch, router and firewall and describe their principle functions.
c. Compare and contrast a client server and peer to peer network.
2. Explain that the session today will build on the concepts and technology of networking in general
and the Internet in particular.
3. The Isaac Computer Ccience resources (links) below introduce and define terms with examples and
provide short videos which you may wish to use either in class or as directed study.
a. Network fundamentals
https://isaaccomputerscience.org/topics/networking?examBoard=all&stage=all
b. The internet
https://isaaccomputerscience.org/topics/the_internet?examBoard=all&stage=all
c. Network hardware
https://isaaccomputerscience.org/topics/network_hardware?examBoard=all&stage=all
d. Communication
https://isaaccomputerscience.org/topics/communication?examBoard=all&stage=all
4. Explain that the session today will build on the concepts and technology of networking in general
and the Internet in particular.
a. Recap on the concepts of Network/host address and interconnection of networks.
5. Internet Addressing: Discuss the IPV4 address format in outline. All the classes do not have to be
covered. Focus on class C.
a. Discuss the limitations of this: Basic limitation of 32 bit address and consider class C
Number of networks, Number of nodes.
b. Ask how to overcome it. Discuss in outline the idea of IPv6. Discuss the interim solution of
private addressing and NAT. Discuss a typical home configuration and the conversion by
the router from private (usually 192.168.x.x) to the ISP given address for the home
network. Diagrams essential here!
c. Ask if they know how IP addresses are given out. Outline the idea of DHCP at local level
and role of ISP. Point out DHCP is a protocol.
6. TCP/IP stack. Briefly discuss the stack, to reinforce the idea of layering and where MAC address
and IP address fit. Outline the function of the IP protocol, discuss what happens if there is a lost
packet.
a. Since the stack is known as TCP/IP, describe briefly TCP and its function.
7. Application layer protocols.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 86


a. Discuss a few application layer protocols so students can illustrate layers and outline their
purpose. Eg HTTP, POP3 , HTTPS.
8. DNS: Since DNS and URLs are so important in the Internet, it is worth discussing as an illustration
of how protocols work in the context of the Internet.
a. Give examples of URLs and IP address.
b. Demonstrate nslookup at the command prompt to convert URL to IP.
c. Discuss primary and secondary DNS servers and ask why there are both.
9. Client Server Computing.
a. Discuss the client server model, and relate it to the Internet.
10. Network Performance: media technology, bandwidth, data rate.
a. Explain how network speed is measured and differentiate bandwidth and data rate.
Emphasize difference between bps and Bps, data rate is in bits per second. Discuss issues
of network performance and the use of different media ( & consequent protocols), the
development from LANs using coaxial cable at 10Mbps to UTP (cat 3-6)raising it to 10Gbps
over limited distances. Discuss copper and fibre domestic connections and data rates.
Discuss Wi-fi standards and data rates.
11. Security.
a. Ask what security issues come with the Internet. Discuss the importance of this and point
out there is a topic devoted to the subject.
b. Ask what is meant by a firewall, outline its purpose.
12. Summarise the key points of the session.
13. Tutorial exercises:
a. Select parts of the networking materials from Isaac Computer Science and ask students to
complete.
b. Ask students to use nslookup on some well-known URLs.
c. Play the Computing version of the “Taboo” game with the acronyms from this topic.
https://en.wikipedia.org/wiki/Taboo_(game)#:~:text=well%20as%202012.-
,Rules,which%20may%20not%20be%20spoken.
d. Select some suitable A-level questions from Isaac Computer Science workbooks that don’t
relate to ancient technology and topology.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 87


TOPIC I – PROBLEM SOLVING, ALGORITHMS
AND PROGRAM DESIGN
Key focus:

Previous topics in the programming strand of the course have taught programming constructs, data
structures and have introduced elements of program design and algorithms through flowcharts,
structured English and pseudocode. This topic builds on these foundations to show how algorithms for
larger problems can be created, represented and implemented in Python. The focus of these algorithms is
primarily searching and sorting. This enables the concepts of efficiency to be discussed.
It is envisaged that the topic will require 3/4 sessions of 2 hours per week.

Specific Learning Outcomes for this topic:

I1 Use Structured English, pseudocode and flowcharts to represent algorithms to solve a well-defined
problem.
I2 Explain and write algorithms for simple well-defined problems.
I3 Explain algorithms for sorting (bubble sort, merge sort).
I4 Explain algorithms for searching (binary search, linear search).
I5 Express time complexity of an algorithm using Big O notation

Previous Learning:

Knowledge of Python programming, data structures and algorithm development.

Supporting Resources:

 IH1 – Searching handout – See Appendix


 IH2 - Tutorial Exercises – See Appendix
 Isaac Computer Science: Section on Searching algorithms:
https://isaaccomputerscience.org/topics/searching?examBoard=ocr&stage=a_level
 Isaac Computer Science: Section on Big O notation and time complexity:
https://isaaccomputerscience.org/concepts/dsa_cmplx_big_o?examBoard=all&stage=al
 Wentworth et Al, ch 14 discusses List algorithms, including searching.

Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Bubble sort, Insertion sort, Linear search, Binary search, Big O notation

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 In pairs, students should write down definitions of key terms, exchanging those definitions with
other pairs for feedback.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 88


 A Computing version of the “Taboo” game . (teams of 2, groups of 4) Keywords are written one per
card, together with definition and a set of associated terms that cannot be used (taboo words).
Players are in teams of two; in their turn a player attempts to prompt their teammate to guess the
keyword by describing it but not using it or the associated (taboo) words. Each player has an allotted
time. The winning team is that with the most correct guesses. It helps students think and articulate
the meaning of terms. A great revision exercises.
o https://en.wikipedia.org/wiki/Taboo_(game)#:~:text=well%20as%202012.-
,Rules,which%20may%20not%20be%20spoken.

Common misunderstandings:
 Students often struggle with sorting algorithms: Provide practice with physical cards to help
reinforce the concepts.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 89


WEEK 22 LECTURE-LAB

SLO Focus I1, I2, I4, I5 Duration Up to 2 hours may be needed to complete activity.

1. Explain that the purpose of this topic is to enable you to explain and program standard algorithms
for searching and sorting. It consolidates existing knowledge of using flowcharts, structured
English and pseudocode.
a. Explain where it fits in the course and how it relates to other topics (B, D, G)
2. Explain the that in this session the SLOs are:
a. Use Structured English, pseudocode and flowcharts to represent algorithms to solve a well-
defined problem.
b. Explain and write algorithms for simple well-defined problems.
c. Explain algorithms for searching (binary search, linear search).
d. Express time complexity of an algorithm using Big O notation.
3. Explain that searching is a common and important process in computing, and selecting the wrong
algorithm can have a large cost on the efficiency (and time taken) of the search.
a. Linear search:
i. Introduce the concept of searching with an exercise to intuitively search for a
number in an unordered list.
ii. Students write the algorithm in structured English.
iii. Discuss their solutions – especially searching for a non-existent item.
iv. Discuss the min, max and average time required to search for an item.
v. Introduce the Big O notation, and what it means, giving value for linear search.
b. Binary Search:
i. Ask if there is a more efficient way of searching if the list is sorted.
ii. Work through an example (such as in IH1) to show the Binary search.
iii. Exercise in pairs to write the algorithm in Structured English and then a flowchart.
iv. Discuss searching for existing and non-existing item.
v. Discuss min, max and average time.
vi. Discuss Big O notation, for binary search.
4. Summarise the key points of the session.
5. Tutorial exercises:
a. Students should read IH1 and complete SAQs, and exercises in IH3 to implement linear and
binary search in Python.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 90


WEEK 23 LECTURE-LAB

SLO Focus I1, I2, I4, I5 Duration Up to 2 hours may be needed to complete activity.

1. Explain the that in this session the SLOs are:


a. Use Structured English, pseudocode and flowcharts to represent algorithms to solve a well-
defined problem.
b. Explain and write algorithms for simple well-defined problems.
c. Explain algorithms for sorting (Bubble sort).
2. Start with a recap of last week’s session, with a quiz question such as the following A-level
question which gives a good opportunity to consolidate Linear, Binary search and Big O notation
and correct misconceptions:
a. Bronwin wants to create a program that will search an array of student names and return
True if a given student has volunteered for the Open Evening. She is considering whether
to use a linear search or a binary search for this purpose.
Each item of the array is a record with three fields:
i. ID: an ID that increments.
ii. student_name : the name of the student.
iii. volunteer : a boolean variable that specifies if they agreed to volunteer or not.
The first three elements of the array are:
[['ST201', 'Simon Brown', True], ['ST202', 'Kate Morris', False], ['ST203', 'Alicia Huston',
False]]
In relation to the use of a linear search or binary search to find an item in an array of
records, which of the following statements is correct?
1) Binary search will find the student much faster than linear search if the array is searched by
using the student_name field.
2) Binary search can find a student in maximum log(n)+1 comparisons (where, n is the number of
elements in the array) if the ID is used to search for a student.
3) Linear search has a time complexity of O(n2) (where n is the number of elements in the array)
as it needs to go through the array and check all three fields for each student.
4) Linear search is the only algorithm that is suitable for finding a student in the array if the
student list is below 100 entries.
3. Explain that sorting is another common and important process in computing, and yet again,
selecting the wrong algorithm can have a large cost on the efficiency (and time taken) of the sort.
4. Introduce sorting:
a. Introduce the concept of sorting with an exercise to intuitively sort a list of numbers in an
unordered list.
b. Students write the algorithm in structured English.
c. Discuss their solutions – especially searching for a non-existent item.
5. Bubble Sort:
© NCUK Ltd. 2023 IFY Computer Science TG v.1 91
a. Using an example, explain the operation of a bubble sort in Structured English and
Pseudocode.
b. Discuss its strengths and weaknesses.
c. Discuss the min, max and average time required to sort a list.
d. Discuss the application of Big O notation, for bubble sort.
6. Summarise the key points of the session.
7. Tutorial exercises:
a. Students should read IH2 and complete SAQs, and exercises 2,3,4 in IH3 including
implementation of a bubble sort in Python.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 92


WEEK 24 LECTURE-LAB

SLO Focus I1, I2, I3, I5 Duration Up to 2 hours may be needed to complete activity.

1. Start with a recap of last week’s session, with a quiz question such as the following A-level
question which gives a good opportunity to consolidate bubble sort and correct misconceptions:
Kofi has written a program to sort an array of data into descending order. The algorithm is a
version of bubble sort and is shown in pseudocode below.
Pseudocode
// Initialise variables
items = [28, 40, 21, 25, 30, 27, 25]
num_items = LEN(items)
temp = 0
pass_number = 1
swapped = False

// Continue while swaps have been made and there are more passes to evaluate
WHILE swapped == True AND pass_number <= num_items - 1
swapped = False
FOR index = 0 TO num_items - 2
// Check if items are out of order
IF items[index] > items[index + 1]
// Swap items
temp = items[index]
items[index] = items[index + 1]
items[index + 1] = temp
swapped = True
ENDIF
NEXT index
pass_number = pass_number + 1
ENDWHILE
There is a problem with the algorithm and it will not sort the data correctly. What is the problem?
In relation to the use of a linear search or binary search to find an item in an array of records,
which of the following statements is correct?
a. The items are being compared in the wrong order.
b. The inner loop is running too many times.
c. The outer loop is running insufficient times.
d. The variable swapped has been initialized incorrectly.
2. Explain the that in this session the SLOs are:
a. Use Structured English, pseudocode and flowcharts to represent algorithms to solve a well-
defined problem.
b. Explain and write algorithms for simple well-defined problems.
c. Explain algorithms for sorting (Merge sort).
3. Explain that there are many sorting algorithms, the bubble sort was chosen for simplicity, the
merge sort is chosen to contrast with it and show better time efficiency.
4. Introduce merge sort algorithm:

© NCUK Ltd. 2023 IFY Computer Science TG v.1 93


a. A good way of introducing this is with pairs of students having a small pack of cards to sort.
You can either give them the algorithm to follow or demonstrate it and they follow along.
b. There is a good explanation in IsaacComputerscience.org:
https://isaaccomputerscience.org/topics/sorting?examBoard=all&stage=all
c. Provide another exercise for them to follow through.
d. Discuss space and time complexity and the relative benefits to bubble sort (available on
Isaac Computer Science).
e. Discuss implementation in preparation for them to code it. It is not expected to be
recursive!
5. Summarise the key points of the session.
6. Tutorial exercises:
a. Students should continue the exercises on Sort. They are likely to require assistance in how
to implement the merge sort.

WEEK 25 LECTURE-LAB

1. Consolidation
2. Exercises: problems that require search or sort.
3. Require pseudocode and translation to python.
4. Tutorial exercises

© NCUK Ltd. 2023 IFY Computer Science TG v.1 94


TOPIC J – SECURITY
Key focus:

This topic focusses on the Information security rather than merely network security. The emphasis
should be on security as a primary requirement for all systems during specification and development and
use/ maintenance. The content is organised to enable students to define information security and
understand the importance of a risk-based approach. Further detail examines threats, vulnerabilities and
their mitigation. Technical approaches of encryption, biometrics and multi-factor authentication are
discussed as key technologies.
Since security breaches arise regularly, it is useful to discuss some in class, especially ones that are local.
The aims of this section are to:
 Explain the key principles of Information Security Management
 Discuss the technical and non-technical controls for risks.
The teaching is planned to take 3 (2 hour) sessions over a period of 3 weeks.

Specific Learning Outcomes for this topic:

J1 Define the terms Confidentiality, Integrity, Availability in the context of security.


J2 Explain, with examples a variety of threats to, and vulnerabilities of computer systems.
J3 Describe security controls including passwords, biometrics, 2FA and good practice.
J4 Describe the concepts of encryption including the role of key(s).
J5 Distinguish asymmetric and symmetric encryption and describe their relative benefits.

Previous Learning:

No prior knowledge of security is required. However, knowledge of the networking topic is beneficial.

Supporting Resources:

 IBM Security trends 2023 Video: https://www.youtube.com/watch?v=uAHFNuDlcRw


 IBM Careers in Cybersecurity video https://www.youtube.com/watch?v=4CuXNs6SboU
 Isaaccomputerscience.org Network security
https://isaaccomputerscience.org/topics/security?examBoard=ocr&stage=a_level
 Isaaccomputerscience.org Encryption:
https://isaaccomputerscience.org/topics/encryption?examBoard=all&stage=all
 JH1 – Tutorial exercises – see Appendix A

© NCUK Ltd. 2023 IFY Computer Science TG v.1 95


Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 Security, confidentiality, integrity, availability, threat, vulnerability, impact, likelihood, risk,
malware, social engineering, multi-factor authentication, biometrics, encryption, symmetric-key
encryption, Asymmetric encryption, VPN, TLS, Certificate Authority, firewall, defence-in-depth,

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 In pairs, students should write down definitions of key terms, exchanging those definitions with
other pairs for feedback.
 Provide topical example from press, ask students to analyse the security issue.
 Give students anagrams of key words from the lesson; they need to work out the word and then
write a definition for it (you can create anagrams on the internet –
https://www.wordsmith.org/anagram/).
 Students draw a diagram to show the TLS handshake.

Common misunderstandings:

 That security is a technical issue.


 TLS use of symmetric and asymmetric keys is often found difficult.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 96


WEEK 22 LECTURE-TUTORIAL

SLO Focus J1, J21 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to enable students to define security, to understand the risk-based
approach and be aware of current trends in threats/attacks.
A good way to introduce the topic is with a recent example of a cybersecurity breach, to discuss how it
occurred and the impact it had. Then ask what the root cause could have been. Get them to focus on
whether it was a technology vulnerability or human vulnerability, since increasing numbers of
successful attacks are through human vulnerabilities (e.g. phishing).
1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Define the terms Confidentiality, Integrity, Availability in the context of security.
b. Explain, with examples a variety of threats to assets, and vulnerabilities of computer
systems.
2. Explain that the purpose of the session today is to enable students to understand the concept of
security, a risk based approach to assessing it and awareness of trends in attacks.
3. Introduce the topic with a case of a data breach and analyse it, or show the IBM video on cyber
security trends 2023 https://www.youtube.com/watch?v=uAHFNuDlcRw (10 mins)
a. Get students to note down the main points, such as ave cost of breach.
b. Biggest threat & impact.
c. Future threats & impacts.
d. Countermeasures being developed.
4. Defining security: discuss what it is and ask students for their definitions. Most will probably focus
on confidentiality/ privacy. Introduce the CIA (Confidentiality/Integrity/Availability) triad. Give
examples of security breaches of each type. DOS/DDOS is the easiest example for availability, but
what about power outage?
5. Introduce the way security is assessed: define Threat, vulnerability, since there are infinite threats
how do we decide what to try and address. Eg of volcano. High impact but (usually) low likelihood
so of little risk. Discuss how impact and likelihood are ‘measured’ (estimated). Introduce the risk
exposure calculation of:
Risk = Impact x likelihood (quantitatively) or use of risk exposure matrix.
6. Discuss risk can be accepted, controlled or transferred. Explain use of risk matrix to decide what
to control.
7. Threats and vulnerabilities.
a. Discuss, with examples the ideas of threat and vulnerability, examples should involve
technology and other sources, for example in a school, the office door of deputy head was
left unlocked, a student entered and photographed confidential information about another
pupil from a physical notebook. They then posted this on social media.
b. Activity to list all the types of threat they can think of – and describe them.
8. Summarise the key points of the session.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 97


9. Tutorial exercises:
a. Set exercise to research and define the current top threats and impact in terms of cost. See
handout JH1

© NCUK Ltd. 2023 IFY Computer Science TG v.1 98


WEEK 23 LECTURE-TUTORIAL

SLO Focus J3 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to discuss security controls for risks.


1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Describe security controls including passwords, biometrics, 2FA and good practice.
2. Introduce the topic with a short quiz on the terms introduced last week, and the types of threats
discovered in their tutorial. Record the top threats that students have found and discuss
variations.
3. One of the most significant threats is posed by a cyberattack that installs ransomware, it is
therefore instructive to explain the typical stages of a cyber-attack with a ransomware payload and
consider what the vulnerabilities were that enabled the system to be compromised.
a. Handout JH2 is a brief article from secures, which outlines a typical scenario. A suitable
approach would be to explain the attack, and then ask students to read the article to
identify ways to control the risk.
b. Emphasize that often the ransomware is introduced following a phishing attack which
enables the attackers to gain employee credentials and enter the system to install the
malware.
c. Discuss phishing attacks and how they work. Ask if this is exploiting a human or technical
vulnerability.
4. Discuss in outline the purpose of a firewall and how it filters traffic.
5. Discuss individual good practice including multi-factor authentication, strong passwords
(passphrases) the use of biometrics, software updates, anti-virus software, and ways to detect
phishing emails.
6. Tutorial exercises:
a. See JH1 for suggestions.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 99


WEEK 24 LECTURE-TUTORIAL

SLO Focus J4, J5 Duration Up to 2 hours may be needed to complete activity.

The previous sessions have explored the concept of security and major threats/vulnerabilities. Some
approaches to mitigating the risk have been presented, but a major defence is encryption. This session
explains the basic concepts of encryption, including symmetric and asymmetric key encryption. It
concludes with an explanation of VPN and TLS, applying both symmetric and asymmetric key
encryption to the everyday task of browsing and connecting to websites in a secure way.
1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Describe the concepts of encryption including the role of key(s).
b. Distinguish asymmetric and symmetric encryption and describe their relative benefits.
2. Introduce the topic with a short quiz on the content discussed last week.
3. Explain that this week is focussed on encryption and its application for security.
a. Explain the definition of encryption, and the components (key, algorithm, plain text
message, and cipher text message). Point out that the security strength of an encryption
scheme is dependent on its algorithm, the size of the key, and the process of key
exchange. Give an example, such as the Caesar cipher
(https://isaaccomputerscience.org/concepts/data_encrypt_caesar?examBoard=ocr&stage=a
_level&topic=encryption). Point out that the same key is used for decryption and
encryption – symmetric key.
i. Ask how secure it is, and how you could crack it. Introduce the brute force attack.
ii. Explain why a longer key makes it more difficult to crack. Discuss the concept of
computational security.
iii. Ask how the key is exchanged and bring out the problem of secret key exchange
for secret (symmetric) keys. Point out that this is THE major problem when
encryption is used to exchange messages across networks.
b. Public key cryptography (asymmetric). Explain that a way round the secret key method is to
have two (related) keys, one for encryption and one for decryption. Using suitable diagrams
and example explain the public key encryption (PKE) system: public key can be sent to
anyone and is used to encrypt the message. Receiver decrypts with private key. Emphasize
that this is secure but very slow – so slow it can’t be used for large messages.
c. Combination symmetric/ asymmetric. Explain that using the asymmetric key to encrypt the
secret key, the latter can be sent securely, solving the key share problem. When exchanged
messages are sent encrypted by secret key.
d. TLS and VPN – Explain two important applications of PKE. Point out TLS (formerly SSL) is
critical for accessing web sites securely using HTTPS protocol:
i. The role of the Certificate Authority in authentication and providing the Public Key.
ii. The basic key exchange algorithm for TLS (as above).
iii. Outline the purpose of a VPN and site-to-site and remote-access VPN. The level of
detail need not be great- it is included so students recognise the term and that it
uses PKE to create a secure tunnel for communication. Explain that this is
sometimes used to hide a person’s location by connecting to a remote server

© NCUK Ltd. 2023 IFY Computer Science TG v.1 100


through a VPN. Their internet traffic then appears to come from the remote site,
effectively hiding their location (and IP address).
4. Summarise the key points of the session.
5. Tutorial exercises:
a. See JH1 for suggestions. The encryption questions are taken from old A-level papers.
Coursework Assignment: Implement an encryption or security protocol for the solution.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 101


TOPIC K – SOFTWARE DEVELOPMENT
PROCESS AND CONCEPTS
Key focus:

This topic focusses on the bigger picture of software development. Much of this course has taught the
details of programming and algorithms from a procedural perspective. This topic puts that knowledge
into context in two ways:
 It places program development in the larger context of software development, and discusses the
Software Development Life Cycle, with explanation of the main phases of Requirements Analysis,
Design, Build/Development, Testing, Implementation and Maintenance. Agile and Waterfall
process models are also included to enable students to contrast approaches and their relative
benefits.
 Within the narrower context of programming, different paradigms are described (OO, Procedural
and functional) and discussion of different languages and their application areas. This naturally
leads to further discussion of compiled and interpreted languages and high /low level languages.
Compilers and Interpreters have been previously introduced, but this topic fleshes those out more
fully. Students should be able to explain the difference between interpreter and compiler and
understand the added complexity of bytecode.
The aims of this section are to:
 Explain the Software Development Process, and activities involved in it, identifying programming
as one piece of the jigsaw.
 Explain the characteristics of different programming paradigms, to position Python within this
typology and outline its application areas.
The teaching is planned to take 2 (2 hour) sessions over a period of 2 weeks.

Specific Learning Outcomes for this topic:

K1 Outline the defining characteristics of procedural, functional and object-oriented programming


paradigms.
K2 Explain the differences between high- and low-level languages.
K3 Identify four common programming languages and outline their application areas.
K4 Compare a compiled language and an interpreted language.
K5 Explain the purpose of the SDLC and outline the meaning of the requirements analysis, design,
implementation, testing and maintenance phases.

Previous Learning:

This topic builds on knowledge from Topics C and F

© NCUK Ltd. 2023 IFY Computer Science TG v.1 102


Supporting Resources:

 Isaac Computer Science section describing programming paradigms


https://isaaccomputerscience.org/concepts/sys_proglang_high_level?examBoard=ocr&stage=a_le
vel
 Videos on SDLC
o Development methodologies part 1
https://www.youtube.com/watch?v=qEmrXu8d1ys&list=PLCiOXwirraUAAGlMOtnDWXIq
82uKwbuAG&index=2&t=6s
o Development methodologies part 2
https://www.youtube.com/watch?v=f_-KHPB817o
 KH1 – exercises – see Appendix A

Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 SDLC, Requirements analysis, Design, Implementation, Testing and Maintenance, Waterfall model,
agile development, High level and low-level language, machine code, procedural, Object-Oriented
and Functional language. Compiler, Interpreter, Assembler.

How teachers could check students’ understanding of key concepts; common errors to look out
for:

 Students work in pairs. Provide each pair with cards containing stages of SDLC and descriptions of
each stage/ activity. Students arrange the cards in the correct sequence and match definitions with
the terms.

Common misunderstandings:

 Students often distinguish Compiler/ Interpreter in terms of speed. This is too vague to be useful:
make sure they can distinguish speed in relation to executed code and speed in terms of
development/ debugging.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 103


WEEK 25 LECTURE-TUTORIAL

K1, K2, K3,


SLO Focus Duration Up to 2 hours may be needed to complete activity.
K4

The purpose of this session is to expand student’s knowledge of programming beyond Python,
contextualizing it within the classifications of high and low level languages, Compiled and Interpreted
languages, and programming paradigms.
It is easiest to start with the distinction of high (HLL) and low-level languages since it relates to current
knowledge and contrasting it with assembly code. It follows naturally to explain how HLLs are
translated into machine code so they can be executed. Finally, discussion of the larger scale view of
programming paradigms, their key features and relative benefits.
1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Outline the defining characteristics of procedural, functional and object-oriented
programming paradigms.
b. Explain the differences between high- and low-level languages.
c. Identify four common programming languages and outline their application areas.
d. Compare a compiled language and an interpreted language.
2. Explain that the purpose of the session today is to expand student’s knowledge of programming
beyond Python, contextualizing it within the classifications of high and low level languages,
Compiled and Interpreted languages, and programming paradigms. This gives a glimpse of the huge
landscape of programming languages and methods.
3. High and Low level languages
4. Recap on the way a computer works, executing machine code instructions which are specific to
that type of cpu and are binary codes. Explain the purpose of assembly code (mnemonics for
instruction codes: 1:1 correspondence) Simple translation of instructions. Refer back to Little Man
Computer from topic A. You may want to demonstrate it again.
5. Discuss the need for high level languages: Human oriented, easier to understand, faster to write
and modify, less likelihood of errors. Emphasize this is another example of Abstraction. 1950’s/
60’s development of FORTRAN, COBOL, ALGOL, C, Simula, LISP. A mixture of languages focussed
on special purpose applications, e.g. simulation (Simula), AI(LISP), scientific computation
(FORTRAN, ALGOL), commerce (COBOL). Point out the climate change model is written in
FORTRAN and COBOL is still in use in some banks.
6. Discuss the need for Translators from HLL to machine code: Compilers and Interpreters. Much
more complex than Assembler.
7. Discuss the differences between an Interpreter and Compiler. Key points include the following:
(from Isaac Computer Science)
8. Compilers
a. Translate code into a form that can be executed. However, the compiler does not execute
the code. Most commercial software applications are distributed as compiled code so that
the source code is protected. This is advantageous to commercial developers who make
money from their code.
b. Compilation involves several processes to produce executable code. Lexical analysis; Syntax
analysis; Semantic analysis; Code generation; Optimisation.
© NCUK Ltd. 2023 IFY Computer Science TG v.1 104
c. Compilation errors are reported at the end of the compilation process. This is a
disadvantage for large programs, as errors may be interlinked. If any errors are found, the
program will need to be rectified and then compiled again; this process is repeated until the
program is free from errors.
d. The executable file can be run again without further translation.
e. A further advantage of using a compiler is that the user does not need a translator to be
installed on their computer as they will never need to translate the program themselves.
9. Interpreters:
10. Interpreters translate and execute each line of source code one by one. If a syntax error is found,
e.g., a missing bracket, the program halts and it is reported.
11. This line-by-line approach allows the developer to test the program and to quickly identify and
remedy each error as it occurs. Interpreters are thus very useful at the development stage of a
program.
12. Source code that is interpreted runs more slowly than compiled code, because each time the
program is run, it must be translated all over again. The user must have the interpreter installed to
be able to run the program.
13. Most interpreted languages now use bytecode as an intermediate stage to speed up the translation
process. The source code is compiled to produce bytecode (low-level code), which is interpreted
(i.e., translated and executed) by a virtual machine.
14. Programming Paradigms:
a. Discuss that over the 60+ years that programming in HLLs has taken place, many attempts
have been made to improve productivity and make systems easier to understand and
modify. This led to different ideas as to how systems should be represented (abstractions)
and the building blocks for those systems. These ‘big ideas’ are called paradigms. We will
discuss 3 paradigms.
b. Procedural / Imperative programming
c. The focus of imperative programming is how the problem should be solved, which requires a
detailed step-by-step guide as a set of processes or procedures. Python is an example of a
language that is primarily procedural.
d. Functional Programming is a paradigm where programs are constructed out of functions,
using functions as variables, arguments, and return values—creating elegant and clean code
in the process and using a process called recursion, where a function can call itself. This
produces very compact code.
e. Object-Oriented Programming is now the dominant paradigm. It models systems as a set
of Objects, which contain data and code relating to them (encapsulation/ abstraction).
These objects communicate using messages to achieve tasks. For example, a bank account
system may have objects that are customer, savings account, current account. To find out
how much money a customer has, the customer object sends a message to the relevant
account object. This paradigm makes heavy use of inheritance. For example, both a
current account and a savings account are kinds of bank account, and have many of the
same properties, so we say that they inherit the properties of the general bank account
object. This is a form of abstraction that simplifies and speeds up development and
maintenance. Many systems (e.g., Android) have huge libraries of built-in objects that your
program can use.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 105


f. Point out that OOP builds on procedural programming, and objects include code which is
essentially constructed in a procedural way. Python can be used as an OOP, but we have
focussed on procedural elements as it is easier to learn.
15. Summary:
a. Summarise the key points of the lecture.
16. Summarise the key points of the session.
17. Tutorial Exercises:
a. Set students activities in KH1, which require them to research these concepts in more
detail.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 106


WEEK 26 LECTURE-TUTORIAL

SLO Focus K4 Duration Up to 2 hours may be needed to complete activity.

The purpose of this session is to place program development in the larger context of software
development, and discuss the Software Development Life Cycle, with explanation of the main phases
of Requirements Analysis, Design, Build/Development, Testing, Implementation and Maintenance.
Agile and Waterfall process models are also included to enable students to contrast approaches and
their relative benefits.
1. Explain the Learning outcomes for the topic and that in this session the SLO is:
a. Explain the purpose of the SDLC and outline the meaning of the requirements analysis,
design, implementation, testing and maintenance phases, together with specific examples of
models for developing software.
2. Explain that the purpose of the session today is to expand student’s knowledge by placing program
development in the larger context of software development.
3. Reinforce knowledge of the last session by discussing the KH1 exercise solutions and responding
to any queries. Point out that functional programming is an advanced topic and they only need to
develop an awareness of the concept.
a. Discuss Java, C, C++, Visual Basic, PHP, JavaScript, Kotlin, F#, their application areas and
paradigm. Point out some can be used to write programs in all 3 paradigms, but generally
are dominant in one.
4. Introduce the SDLC and the process of developing software. A good approach is to illustrate with
an example.
a. Key point: Software is complex and projects are large. It is therefore essential to break the
development process down into manageable chunks (abstraction/ decomposition/
modelling) to reduce the chance of errors.
b. The systems development life cycle (SDLC) defines the main stages of software
development. There are many different approaches to software development and most
development teams use an iterative approach, where stages are combined and revisited
throughout the project. (Isaac Computer Science)
c. Outline the main stages and the activities and outputs from each stage.
i. (requirements) Analysis, Design, Build(development), Test, Maintenance.
ii. A useful approach is to provide a brief real-world example of designing a car. Ask
what requirements might be and how find out. Then ask what next stage – design
would be and how represented etc. This illustrates the incremental approach.
iii. Note that different authors classify activities slightly differently. You may want to
use parts of the videos or set activities using them. The two below are listed
because they give slightly different models, and it is important that students
understand the key activities, but also can cope with variation of emphasis.
5. Useful videos:
a. https://www.youtube.com/watch?v=Fi3_BjVzpqk
b. https://www.youtube.com/watch?v=qEmrXu8d1ys Focussed on A-level

© NCUK Ltd. 2023 IFY Computer Science TG v.1 107


6. Outline specific process methodologies. The purpose here is to point out that there are different
processes, and to emphasize a key problem is the need to change things during a project. Thus, an
iterative approach is recommended. Discuss Waterfall (and its problems), RAD/Agile to illustrate
these points. The videos discuss additional variations.
7. Summary:
a. Point out that the models are high level abstractions of the processes, and real
development projects have variation.
b. Key points are the activities Analysis, Design, Build (development), Test, and Maintenance.
The outputs of requirement spec, design models (spec), Program code, Test plan and
results.
c. Requirements inevitably change so an iterative approach is preferred.
d. Emphasize that the models described assume that a software system is being created from
scratch. Increasingly there is emphasis on reuse of components which can be modified to
meet different requirements.
i. The benefits of component-based architecture are ease of deployment, reduced
cost, ease of development, reusable, and mitigation of technical complexity. Ease
of deployment: when new well-matched versions become available, it can replace
the current versions without any drawback on the other components or the
products. Reduced costs, using third party components in terms of development
and technical support. In terms of ease of development, components implement
well-known interfaces to provide defined functionality, allowing development without
impacting other parts of the system. The use of reusable components is to extend
applications or systems; and mitigation of technical complexity through the use of a
component container and its services.
ii. The main weakness of component based architectural style are message handling,
and these need to be predefined for the components. Further, dependency on third
parties for updates and changes to the component. While components are designed
to reduce complexity of systems it introduces a different type of complexity in terms
of component-to-component interactions. Testing can be difficult if the component
doesn't come with its own execution environment.
8. Summarise the key points of the session.
9. Tutorial Exercises:
a. Set students activities in KH1

© NCUK Ltd. 2023 IFY Computer Science TG v.1 108


TOPIC L – ETHICS AND THE IMPACT OF
COMPUTING
Key focus:

The application of computing has had an impact on almost all aspects of society. It is important that
students adopt a critical approach to ensure the technology is used for good rather than harm. There will
always be areas of dispute, but the important thing is to ensure students don’t merely accept it as
inevitable.
The topic is split broadly into two areas: legal obligations and other social, ethical and cultural issues.
The topic discusses copyright and Intellectual property and includes an overview of EU’s GDPR, since it
is an example of good practice and it applies to all organizations that deal with the EU. It is
recommended that students explore their local data protection legislation and compare it with GDPR.
The course will also require students to give examples of issues (and explain them) in other areas, but
assessment will be general enough that you can select them from a wide range of possibilities. For
example:
 Social Media & gaming
 AI
 Censorship
 Environment
 Workforce impact
 Computer misuse.

Specific Learning Outcomes for this topic:

L1 Identify and analyse examples of social, legal ethical and cultural issues associate with the use of
computer technology.
L2 Explain how social, legal ethical and cultural issues impact society and individuals.

Previous Learning:

No prior learning is required, though an awareness of the capabilities of computers is useful.

Supporting Resources:

 GH1 – Short case study – see Appendix A


 GDPR website: https://gdpr.eu/what-is-gdpr/
 Craig’n’Dave Videos:
https://www.youtube.com/watch?v=4h5zlBOgZz0&list=PLCiOXwirraUBrBvmXkcwEYki7YOOkCg
jC&index=2 Computer Science

Key vocabulary and structures:

Students should be able to define and, where appropriate, provide examples of the following:
 GDPR, Ethical issue caused by application of computing.
 Local press/ magazine stories that include an ethical/cultural/social issue caused by computing.
© NCUK Ltd. 2023 IFY Computer Science TG v.1 109
How teachers could check students’ understanding of key concepts; common errors to look out
for:

 The primary organisation of this topic is for group discussion with presentation of summary of their
conclusions, thus the teacher can review and discuss with them any misconceptions.

Common misunderstandings:

 Students often confuse data protection with hacking. Choose examples to show accidental data
protection breaches.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 110


WEEK 27 LECTURE-TUTORIAL

SLO Focus L1, L2 Duration Up to 2 hours may be needed to complete activity.

It is recommended that the session is run by considering case studies and raising discussion questions.
1. Explain the Learning outcomes for the topic and that in this session the SLOs are:
a. Identify and analyse examples of social, legal ethical and cultural issues associate with the
use of computer technology.
b. Explain how social, legal ethical and cultural issues impact society and individuals.
2. Explain that in this session students will be able to:
a. Discuss legal requirements arising from GDPR, Copyright and local Data protection
legislation.

b. Identify and discuss social, ethical and cultural issues associated with specific
application of computing technology.

3. Introduce the GDPR, provide a brief background and explain why it is important. Identify local
equivalent legislation.
4. Activity: In groups students summarise & compare GDPR and local data protection legislation. Use
handout LH1.
5. Discuss the concept of Intellectual Property -an umbrella term which includes several types of
property including copyrights, trade-marks, patents, etc. It is likely that students are not familiar
with it so use plenty of examples. Copyright is something that’s automatically granted to the
creator of an original work, be that work a piece of literature, art, music, or software. This is a
good area for discussion as to why it is important. It also provides a good introduction to
referencing of sources in academic work, and closer to home, cheating and copying other’s work.
6. Identify suitable local case studies that relates to cultural, ethical or social impact of computing, for
example in the areas of: Social Media & gaming AI, Censorship, Environment, Workforce impact,
face recognition. In groups students should analyse these and identify impact on individuals and
society. Groups should share their suggestions in a plenary; discuss their findings.
7. Summarise key points from discussions. Encourage students to take a critical approach and look for
ethical issues in new developments.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 111


WEEK 27 –COURSEWORK TUTORIAL

Coursework Assignment:
1. Provide lesson time for students to work on their coursework.
2. Review and feedback on work so far and plan.
3. Discuss next steps in coursework:
a. Demonstration
b. Final Report

WEEKS 28 & 29

These two weeks should be given over to revision of topics in preparation for students taking the final
Examination and demonstration of their coursework program.
1. Coursework demonstration
2. Sample exam questions
a. Students should use the exemplar assessment and past paper questions to work on
examination technique.

WEEK 30

Week 30 will generally be used for students to complete their final Examination.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 112


APPENDIX - HANDOUTS

HANDOUTS - INTRO
Online research and group discussion
 Work individually or in pairs to research online:
o Careers available in computing, for example via local and international careers service
websites and/or company web sites.
o Undergraduate degree courses available locally or internationally,
 Write brief summaries of your areas of interest.
 Following the research activity, you should work in a group to share your finding:
o What are you interested in and why?
o What would be the next step to find out more?
o What skills/ knowledge qualifications are needed?

© NCUK Ltd. 2023 IFY Computer Science TG v.1 113


AH1- COMPUTER ARCHITECTURE
1. Identify whether the following would be stored in Primary or Secondary storage:

a. Word Processed document while being edited.

b. Word processed document when not being edited.

c. Application program not in use.

d. Phone contact details.

e. Assignment from last semester.

f. System time.

g. Email.

2. Write down as many input and output devices as you can.

a. For each, explain what it is used for and problems it can have.

3. For the following systems, identify the input(s) outputs, storage and reasons for choice. Example
systems could be:

b. Transferring photos from phone to PC.

c. Police speed camera.

d. Supermarket checkout.

e. Backing up a supermarket’s sales data.

f. A school networks.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 114


BH1 - PROGRAMMING EXERCISES
Conditional (selection) statements
1. Write a program that inputs a number and prints a message stating whether it is positive or not.
a. Extend the program to print ‘positive’, ‘negative’ or ‘zero’ depending on its value.
2. Write a program that inputs a number and prints a message stating whether it is odd or even. (Hint.
Use a test of the result of the % (modulus) operator).
3. Assume the days of the week are numbered 0,1,2,3,4,5,6 from Sunday to Saturday.
a. Draw a flowchart for a program to input a day number and prints the day name.
b. Convert the flowchart to Python.
c. Convert the program to a function, with a parameter of the day number and return value the
string day name. Write code to input day number and print the function result in the main
program.
d. What values would you use to test the program?
e. Think about validation. What test(s) should you make to ensure the input is valid? Write code
to check the input is valid. Should this be in the main program or the function? What are the
advantages and disadvantages of each?
f. Construct a test plan for this program.
4. EXTENSION The program you designed is likely to have used repeated elif statements. Python 3.10
introduced a new feature called match/case (known as a switch statement in some other languages)
which improves readability of this type of multi-way selection. Look this up and modify your program
to use it. A possible web site which explains it is: https://www.freecodecamp.org/news/python-
switch-statement-switch-case-example/
a. A courier company charges the following for parcel delivery:
i. Small Parcels not exceeding: Length: 45cm Width: 35cm Depth: 16cm Weight limit: 2kg: Price
£4.15
ii. Medium Parcels not exceeding: Length: 61cm Width: 46cm Depth: 46cm Weight limit: 20kg:
(0-2kg £5.95; 2-10kg: £7.65; 10-20kg: £11.65)
iii. Anything else is ‘special delivery’.
b. A program is needed to input the dimensions and weight and print the postage cost.
i. Draw a flowchart.
ii. Convert it to Python.
iii. Construct a test plan.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 115


While loops

1. The following Structured English describes an algorithm used to count the number of odd and even digits in an
input sequence.
a. Initialise variables OddCount and EvenCount to zero.
b. Prompt and input an integer.
c. WHILE the integer is not in the range 0 to 9 DO
2. IF the integer is an even number, THEN add 1 to EvenCount.
3. Otherwise add 1 to OddCount.
4. ENDWHILE
5. Output "Same" if there are the same number of odd and even integers.
6. Output "Odd" if there are more odd than even integers.
7. Output "Even" if there are more even than odd integers.
a. Draw a flowchart to represent the algorithm.
b. Convert it to Python code.
8. Write Structured English and Python code to sum up all the negative numbers in an input sequence.
9. Write Structured English and Python code to count how many words in an input sequence have length 4.
10. Write Structured English and Python code to sum up all the negative numbers in an input sequence.
11. Write Structured English and Python code to sum all the elements in a list up to but not including the first
even number.
File Processing

1. Read Chapter 13 of Wentworth: https://openbookproject.net/thinkcs/python/english3e/files.html


a. Write a Python program that performs the simplest of file processing actions: Writes a line to a text
file, reads it back and prints it.
b. Where has the program stored the file on disk? Locate it and open it with Notepad to check it
contains what you’d expect.
2. Write a program to write 10 lines to a file, containing the text:
This is line 1
This is line 2
…etc
3. It should lso read the text back and print it to the screen.
4. The following algorithm, expressed in pseudocode, writes a text file containing student names and exam
results. Each record has two fields name and mark separated by commas.
markFile = openWrite(“marks.txt”)
name = INPUT (“Input first student name: ”)
WHILE name != “x”
mark = INPUT (“Input student mark: ”)
markFile.writeline (name + “,” + mark + “\n”)
name = INPUT (“Input next student name, x to end: ”)
ENDWHILE
CLOSE markFile

5. Explain why there are INPUT statements outside the WHILE loop as well as within the loop.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 116


a. What change would you need to make to the pseudocode if the file already had some marks in it and
you wanted to add some more records to the file?

b. Convert the pseudocode to Python and run the program.

6. The second program opens the marks file for reading. It reads each record and prints all records of students
who scored a mark of 70 or more in the exam.
markFile = openRead (“marks.txt”)
markRec = markFile.readLine()
WHILE NOT End of file
Split record into two fields name, mark
Convert mark to integer
IF mark > 69 THEN
PRINT (name, mark)
ENDIF
markRec = markFile.readLine()
ENDWHILE
CLOSE markFile

a. Convert this pseudocode to Python and run the program.

b. Modify the algorithm so that it reads the names and marks and prints the name and mark of the
student with the highest mark. (Assume no two students achieved the same mark.) Write and run the
program in Python.

c. Amend the algorithm so that if more than one student achieves the top mark, their names are printed?
Write and run the program in Python.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 117


CH1 ALGORITHM DESIGN PROCESS
Edwards, S., Dorn, B., and Sanders, D. (2012)

http://sofia.cs.vt.edu/cs1114-ebooklet/chapter4.html

Step 1: Obtain a description of the problem.

This step is much more difficult than it appears. In the following discussion, the word client refers to
someone who wants to find a solution to a problem, and the word developer refers to someone who
finds a way to solve the problem. The developer must create an algorithm that will solve the client's
problem.
The client is responsible for creating a description of the problem, but this is often the weakest part of
the process. It's quite common for a problem description to suffer from one or more of the following
types of defects: (1) the description relies on unstated assumptions, (2) the description is ambiguous, (3)
the description is incomplete, or (4) the description has internal contradictions. These defects are seldom
due to carelessness by the client. Instead, they are due to the fact that natural languages (English,
French, Korean, etc.) are rather imprecise. Part of the developer's responsibility is to identify defects in
the description of a problem, and to work with the client to remedy those defects.

Step 2: Analyze the problem.

The purpose of this step is to determine both the starting and ending points for solving the problem. This
process is analogous to a mathematician determining what is given and what must be proven. A good
problem description makes it easier to perform this step.
When determining the starting point, we should start by seeking answers to the following questions:
 What data are available?
 Where is that data?
 What formulas pertain to the problem?
 What rules exist for working with the data?
 What relationships exist among the data values?
When determining the ending point, we need to describe the characteristics of a solution. In other
words, how will we know when we're done? Asking the following questions often helps to determine the
ending point.
 What new facts will we have?
 What items will have changed?
 What changes will have been made to those items?
 What things will no longer exist?

Step 3: Develop a high-level algorithm.

An algorithm is a plan for solving a problem, but plans come in several levels of detail. It's usually better
to start with a high-level algorithm that includes the major part of a solution, but leaves the details until
later. We can use an everyday example to demonstrate a high-level algorithm.
Problem: I need a send a birthday card to my brother, Mark.
Analysis: I don't have a card. I prefer to buy a card rather than make one myself.
High-level algorithm:

© NCUK Ltd. 2023 IFY Computer Science TG v.1 118


1. Go to a store that sells greeting cards.
2. Select a card.
3. Purchase a card.
4. Mail the card.
This algorithm is satisfactory for daily use, but it lacks details that would have to be added were a
computer to carry out the solution. These details include answers to questions such as the following.
1. "Which store will I visit?"
2. "How will I get there: walk, drive, ride my bicycle, take the bus?"
3. "What kind of card does Mark like: humorous, sentimental, risqué?"
These kinds of details are considered in the next step of our process.

Step 4: Refine the algorithm by adding more detail.

A high-level algorithm shows the major steps that need to be followed to solve a problem. Now we need
to add details to these steps, but how much detail should we add? Unfortunately, the answer to this
question depends on the situation. We have to consider who (or what) is going to implement the
algorithm and how much that person (or thing) already knows how to do. If someone is going to purchase
Mark's birthday card on my behalf, my instructions have to be adapted to whether or not that person is
familiar with the stores in the community and how well the purchaser known my brother's taste in
greeting cards.
When our goal is to develop algorithms that will lead to computer programs, we need to consider the
capabilities of the computer and provide enough detail so that someone else could use our algorithm to
write a computer program that follows the steps in our algorithm. As with the birthday card problem, we
need to adjust the level of detail to match the ability of the programmer. When in doubt, or when you
are learning, it is better to have too much detail than to have too little.
Most of our examples will move from a high-level to a detailed algorithm in a single step, but this is not
always reasonable. For larger, more complex problems, it is common to go through this process several
times, developing intermediate level algorithms as we go. Each time, we add more detail to the previous
algorithm, stopping when we see no benefit to further refinement. This technique of gradually working
from a high-level to a detailed algorithm is often called stepwise refinement.
Stepwise refinement is a process for developing a detailed algorithm by gradually adding detail to a high-
level algorithm.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 119


Step 5: Review the algorithm.

The final step is to review the algorithm. What are we looking for? First, we need to work through the
algorithm step by step to determine whether or not it will solve the original problem. Once we are
satisfied that the algorithm does provide a solution to the problem, we start to look for other things. The
following questions are typical of ones that should be asked whenever we review an algorithm. Asking
these questions and seeking their answers is a good way to develop skills that can be applied to the next
problem.
1. Does this algorithm solve a very specific problem or does it solve a more general problem ?
If it solves a very specific problem, should it be generalized?
a. For example, an algorithm that computes the area of a circle having radius 5.2 meters
(formula π*5.2 2) solves a very specific problem, but an algorithm that computes the area of
any circle (formula π*R2) solves a more general problem.
2. Can this algorithm be simplified ?
a. One formula for computing the perimeter of a rectangle is:
b. length + width + length + width
c. A simpler formula would be:
d. 2.0 * (length + width)

3. Is this solution similar to the solution to another problem? How are they alike? How are they
different?
a. For example, consider the following two formulae:
b. Rectangle area = length * width
Triangle area = 0.5 * base * height
c. Similarities: Each computes an area. Each multiplies two measurements.
d. Differences: Different measurements are used. The triangle formula contains 0.5.
e. Hypothesis: Perhaps every area formula involves multiplying two measurements.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 120


CH2- EXERCISES IN COMPUTATIONAL THINKING
1. Watch the Youtube Video: https://www.youtube.com/watch?v=dHWmnayy8MY. This explains
the principles of computational thinking in everyday terms.
a. Make brief notes explaining the computational thinking terms that are described.
b. Given the problem of booking a holiday, use computational thinking to produce a list of
tasks that are needed. You should break the main problem down into sub-problems and
so on. Give examples of where you would use pattern matching, Abstraction, Logical
reasoning, decomposition and refinement to solve the problem.
2. You go into a shop that only accepts cash. You select an item you want to buy. You have a variety
of coins/notes in your pocket. Design an algorithm to pay for the item using the minimum
number of coins/notes.
a. Restate the problem simply and specifically as a goal.
b. Analyse the problem: what data do you have? What information do you need?
c. Work out a high-level series of steps (algorithm) to solve the problem. This should identify
sub-problems.
d. Work on each sub-problem – break it down (decomposition) and refine it by adding detail.
e. Review the final algorithm. Can you generalise any of it?
3. Balancing the Seesaw, you are running a summer camp for children and are put in charge of the
Seesaw. This is most fun when the two sides of the Seesaw are balanced but you have the issue
that children are different weights. Your solution is to give each child a hat of varying weight to
balance them out. To help in this task you need to devise an algorithm that takes the weights of
two children and the weights of the available hats and works out which hats to give each child.
4. More Jeroo exercises: Write algorithms to make the Jeroo.

a. Walk across the grid and back.


b. Learn to Polka: a three-quarter turn, walk one step, repeat for 4 steps.
c. Walk in a square two steps wide ending back on the home square facing east.
d. Turn a full circle on the spot at the top left corner of the grid.
e. Walk three steps across from the top left corner.
f. Walk six steps across.
g. Walk across all the squares in the grid.
h. Amend your solution to the previous question so that it pulls up flowers on the grid and
then at the end display how many flowers it has pulled up. Note that the flowers are in
random positions and the jeroo has to check if there is one on a square before it pulls it
up.
© NCUK Ltd. 2023 IFY Computer Science TG v.1 121
b. Write an algorithm that reads in a sentence and counts the number of words. Express it in
structured English and then as a flowchart.
c. Write an algorithm that reads in a sentence and counts the number of words and vowels.
Express it in structured English and then as a flowchart.
d. Modify algorithm for question 6 to identify the word in the sentence with the most vowels ( &
print the word & number of vowels).

© NCUK Ltd. 2023 IFY Computer Science TG v.1 122


DH1- ABSTRACTION, MODULARITY AND FUNCTIONS
a. Read the section on computational thinking, the sub-sections on Thinking Logically,
abstraction and decomposition.
Write Python programs to do the following:
b. Write a function that asks for a number and outputs the square of that number. Write
code that calls it and check it works.
c. Modify the function with one parameter and the function is called with an argument that
is the number to square and print. The input should be done in the main program before
the function is called.
d. Enter the following program. Insert the function call where the line # Insert Code is:
def calculateAverage(param1, param2):
# Add up the numbers and divide by the number of numbers
total = param1 + param2
average = total / 2
print ("average is: " ,average)
return

x = 3
y = 4
# Insert Code to call the function with arguments x and y
e. Modify the program (4) to print the value of the variable average after the function call.
What happens when you run it? Explain why.
f. Modify the program (4) to print the value of the variable x inside the function. What
happens when you run it? Explain why.
g. Modify the program to take 4 parameters and calculate the average.
h. Modify the program (7) to call the function twice, with different parameter values each
time.
a. answer as 8 binary digits. You can assume that the user will only enter values of N in the
range 0 <= N <= 255

© NCUK Ltd. 2023 IFY Computer Science TG v.1 123


EH1- DENARY TO HEX JIGSAW
 This activity is for pairs or groups of 3 students.
 Cut out the 16 triangular jigsaw pieces for each group (on following pages).
 The group task is to match sides to create a triangle from the pieces.

Teacher’s Solution

© NCUK Ltd. 2023 IFY Computer Science TG v.1 124


© NCUK Ltd. 2023 IFY Computer Science TG v.1 125
© NCUK Ltd. 2023 IFY Computer Science TG v.1 126
EH2- SOUND REPRESENTATION

1. Increasing the sampling rate


While 44.1kHz is the standard rate used by CDs and MP3s, the most common sampling rate for
audio tracks used in movies and DVDs is 48kHz. If you increase the sampling rate from 44.1kHz to
48kHz: What is the effect on file size?
1. This has increased the file size by around 11.2MB or 9%.
2. Decreasing the sampling rate
Typically, FM radio uses a sampling rate of 32kHz and this rate is also used by some digital video
audio since it allows four channels of audio to be recorded. What is the effect on file size?
2. This has reduced the original file size of 127MB down by around 34.8MB or 27%.
3. Increasing the sample resolution
Allocating more bits for the sample resolution provides a greater dynamic range. For example, Blu-
ray discs, which are used for high-definition video and were designed to supersede DVDs, support
a 24-bit audio sample resolution.
Compare this to the original file that uses 16 bits:
3. This has increased the original file size of 127MB up by around 63.5MB or 50%.
4. Decreasing the sample resolution
Some digital audio files use a 12-bit sample resolution instead of 16 bits.
What is the effect on file size?
4. This has reduced the original file size of 127MB down by around 31.7MB or 25%.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 127


EH3- IMAGE REPRESENTATION ACTIVITY
Images are created by light, which is also an analogue quantity, and a digital camera converts light into
digital signals by sampling the image that has been focused onto a sensor array.
This exercise is concerned with how images are represented. There are two primary methods: Bitmap
graphics and vector graphics. You need to conduct some research to answer the following questions.
You must not cut and paste what you find but summarize it in your own words. You should also list the
references you used.

Questions

1. Summarise, with suitable diagrams what is meant by a bitmap graphics. Your explanation should
include definitions of pixel, colour depth and resolution.

2. Explain how the file size needed to store an image can be calculated. Include an example.

3. Explain what is meant by compression of an image. Distinguish clearly between lossy


compression and lossless compression.

4. Four file formats are .bmp, .jpg, .png, .gif. State whether each of these involves compression
and (if so) whether it is lossy or lossless.

5. Explain briefly what is meant by vector graphics, and how it differs from bitmap graphics.

6. List the sources you used, together with their URL (if web sources).

© NCUK Ltd. 2023 IFY Computer Science TG v.1 128


EH4 –BOOLEAN ALGEBRA AND TRUTH TABLES
1. For each of the following logic circuits write them as Boolean expressions and draw truth tables:

Logic circuit Boolean expression

2. Complete the truth table below to prove the following equation is true. It is known as De-Morgan’s
theorem.

𝑨 + 𝑩 = 𝑷. 𝑸

P Q P+Q 𝑷+𝑸 𝑷 𝑸 𝑷.𝑸

0 0
0 1
1 0
1 1

© NCUK Ltd. 2023 IFY Computer Science TG v.1 129


FH1 – RESEARCH EXERCISE: TYPES OF SOFTWARE
In this exercise you will work in groups to research, summarise and produce a short presentation present
answers to the questions below. At the end of the activity, you should be able to explain different types
of software, why they are needed and how they relate to hardware. It is ok to quote definitions, but any
general summaries must be in your own words. You MUST include references to your research.
What is firmware and why is it necessary? How does it relate to software and hardware? Give an
example.
1. What is system software and why is it necessary? Provide examples of system software.
2. Operating systems (O/S) are essential pieces of software on a computer system. What is the purpose
of an O/S? Distinguish the key features of the following types of O/S and give an example of where
each would be used:
a. Real time O/S.
b. Embedded System.
c. Multi-Tasking O/S.
d. Multi-User O/S.
3. Distributed O/S.
4. What is meant by the term Application Software? Give an example.
5. Draw a diagram showing how hardware, software, application software, firmware and system
software are related.
6. Which category would you put the following into?
a. BIOS.
b. Device Driver.
c. Windows 11.
d. Linux.
e. Raspberry pi.
f. Python.
i. Three categories of software are: general purpose software, program translators, and
utility software. Software in which category is responsible for reorganising files on a hard
disk and encrypting data on storage devices?

Resources

You may find the following useful in your research.


 Intro video on O/S https://www.youtube.com/watch?v=5AjReRMoG3Y
 Isaac Computer Science resources (A-level)
https://isaaccomputerscience.org/?examBoard=all&stage=all
 How Stuff Works: https://computer.howstuffworks.com/bios.htm

© NCUK Ltd. 2023 IFY Computer Science TG v.1 130


FH2 – PROCESSOR PERFORMANCE EXPLORATION WITH PYTHON
The code below runs some pointless processing and times how long it took to complete. This will be
affected by other processes running in the system.
import time
st=time.time()#read system time before
for i in range(1000):
print(i*5/3+100)#random nonsense processing
en=time.time()#read system time after
t= en-st #calculate the difference b/w end and start time
print("Process completed in {} seconds".format(t) )
The output:

Same program run with a USB microphone plugged in (all other things left same):

Task: Try rerunning your timing script while engaging or disengaging other activities, for example playing
a YouTube video, running a file search, zipping a folder.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 131


List your experiment conditions and the difference in time:

Experiment
Time difference

© NCUK Ltd. 2023 IFY Computer Science TG v.1 132


FH3 - SCHEDULING EXERCISE
A scheduling algorithm determines the order in which an operating system will execute processes. How
quickly a process will finish depends on the size of the job and the scheduling algorithm used.
Some jobs are sent to be processed. The times shown are in seconds.

Time to
Arrival time Job complete

0:00 A 5:00

2:30 B 2:00

3:10 C 1:00

In which order will the jobs complete under each of the following scheduling algorithms? Give reasons
for your answer.
 Round robin.
o Assume that:
o A time slice is 1 second.
o If a job is not finished when the time slice completes, it joins the rear of the queue for
another slice of the action!
 First come, first served.
 Shortest Job First.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 133


FH4 – SOFTWARE LICENSES
Consult the GNU site (https://www.gnu.org/licenses/license-list.html) and the Free Software Foundation
site (http://www.fsf.org) for a concise list of different, free and open source licenses available.
1. Browse the list of free software on this site: http://directory.fsf.org/wiki/Main_Page. Do you
recognise any of the software listed there? If not, why?
2. Create a list of software used by three other students, including mobile apps and for every
application, note its license (the information can be obtained off the author’s website or
Wikipedia).
Name _____________
Main computer type/model/OS ________________
Main mobile type/model/OS ___________________

Commercial GNU applications/apps Other software licenses used


applications/apps used used

© NCUK Ltd. 2023 IFY Computer Science TG v.1 134


FH5 – SERVER VIRTUALIZATION AND CLOUD COMPUTING
1. Read the article on Techtarget: https://www.techtarget.com/searchitoperations/definition/What-is-
server-virtualization-The-ultimate-guide
a. Summarise the article, making notes of:
i. What a Hypervisor is and how it manages multiple VMs.
ii. Benefits and risks of Virtualization.
iii. Example uses.
b. You may like to try out a simple virtual machine, known as virtual Box
https://www.virtualbox.org/ . It can be installed on Windows (as the host) and you can then
set that up to run any O/S that it supports. Linux is free so it is a good one to start with. If
your host is powerful enough, several VMs can be created, and networked to practice
networking and security configuration for example.
2. Read the article from Woodford (2022) on Cloud Computing
https://www.explainthatstuff.com/cloud-computing-introduction.html
a. Summarise what you consider to be the key points and make a note of any points you don’t
understand, to raise with your tutor.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 135


FH6 – THE 15 BIGGEST RISKS OF ARTIFICIAL INTELLIGENCE
Bernard Marr
https://www.forbes.com/sites/bernardmarr/2023/06/02/the-15-biggest-risks-of-artificial-
intelligence/amp/?fbclid=IwAR2DI0sEyU-xQdQ_SABjgN2YIpZfXgTfmh2B324ftVGLi86C0PJ_n_R_Diw
Jun 2, 2023,03:07am EDT

As the world witnesses unprecedented growth in artificial intelligence (AI) technologies, it's essential to
consider the potential risks and challenges associated with their widespread adoption.
AI does present some significant dangers — from job displacement to security and privacy concerns —
and encouraging awareness of issues helps us engage in conversations about AI's legal, ethical, and
societal implications.
Here are the biggest risks of artificial intelligence:

1. Lack of Transparency

Lack of transparency in AI systems, particularly in deep learning models that can be complex and
difficult to interpret, is a pressing issue. This opaqueness obscures the decision-making processes
and underlying logic of these technologies.
When people can’t comprehend how an AI system arrives at its conclusions, it can lead to distrust
and resistance to adopting these technologies.

2. Bias and Discrimination

AI systems can inadvertently perpetuate or amplify societal biases due to biased training data or
algorithmic design. To minimize discrimination and ensure fairness, it is crucial to invest in the
development of unbiased algorithms and diverse training data sets.

3. Privacy Concerns

AI technologies often collect and analyze large amounts of personal data, raising issues related to
data privacy and security. To mitigate privacy risks, we must advocate for strict data protection
regulations and safe data handling practices.

4. Ethical Dilemmas

Instilling moral and ethical values in AI systems, especially in decision-making contexts with
significant consequences, presents a considerable challenge. Researchers and developers must
prioritize the ethical implications of AI technologies to avoid negative societal impacts.

5. Security Risks

As AI technologies become increasingly sophisticated, the security risks associated with their use
and the potential for misuse also increase. Hackers and malicious actors can harness the power of
AI to develop more advanced cyberattacks, bypass security measures, and exploit vulnerabilities
in systems.
The rise of AI-driven autonomous weaponry also raises concerns about the dangers of rogue
states or non-state actors using this technology — especially when we consider the potential loss
of human control in critical decision-making processes. To mitigate these security risks,
governments and organizations need to develop best practices for secure AI development and

© NCUK Ltd. 2023 IFY Computer Science TG v.1 136


deployment and foster international cooperation to establish global norms and regulations that
protect against AI security threats.

6. Concentration of Power

The risk of AI development being dominated by a small number of large corporations and
governments could exacerbate inequality and limit diversity in AI applications. Encouraging
decentralized and collaborative AI development is key to avoiding a concentration of power.

7. Dependence on AI

Overreliance on AI systems may lead to a loss of creativity, critical thinking skills, and human
intuition. Striking a balance between AI-assisted decision-making and human input is vital to
preserving our cognitive abilities.

8. Job Displacement

AI-driven automation has the potential to lead to job losses across various industries, particularly
for low-skilled workers (although there is evidence that AI and other emerging technologies
will create more jobs than it eliminates).
As AI technologies continue to develop and become more efficient, the workforce must adapt and
acquire new skills to remain relevant in the changing landscape. This is especially true for lower-
skilled workers in the current labour force.

9. Economic Inequality

AI has the potential to contribute to economic inequality by disproportionally benefiting wealthy


individuals and corporations. As we talked about above, job losses due to AI-driven automation
are more likely to affect low-skilled workers, leading to a growing income gap and reduced
opportunities for social mobility.
The concentration of AI development and ownership within a small number of large corporations
and governments can exacerbate this inequality as they accumulate wealth and power while
smaller businesses struggle to compete. Policies and initiatives that promote economic equity—
like reskilling programs, social safety nets, and inclusive AI development that ensures a more
balanced distribution of opportunities — can help combat economic inequality.

10. Legal and Regulatory Challenges

It’s crucial to develop new legal frameworks and regulations to address the unique issues arising
from AI technologies, including liability and intellectual property rights. Legal systems must
evolve to keep pace with technological advancements and protect the rights of everyone.

11. AI Arms Race

The risk of countries engaging in an AI arms race could lead to the rapid development of AI
technologies with potentially harmful consequences.
Recently, more than a thousand technology researchers and leaders, including Apple co-founder
Steve Wozniak, have urged intelligence labs to https://futureoflife.org/open-letter/pause-giant-
ai-experiments/ The letter states that AI tools present “profound risks to society and humanity.”
In the letter, the leaders said:

© NCUK Ltd. 2023 IFY Computer Science TG v.1 137


"Humanity can enjoy a flourishing future with AI. Having succeeded in creating powerful AI
systems, we can now enjoy an 'AI summer' in which we reap the rewards, engineer these systems
for the clear benefit of all, and give society a chance to adapt."
Other follow up references:
https://futureoflife.org/wp-content/uploads/2023/04/FLI_Policymaking_In_The_Pause.pdf
https://www.theguardian.com/technology/2023/mar/31/ai-research-pause-elon-musk-chatgpt
https://www.bbc.co.uk/programmes/m001216k/episodes/player

12. Loss of Human Connection

Increasing reliance on AI-driven communication and interactions could lead to diminished


empathy, social skills, and human connections. To preserve the essence of our social nature, we
must strive to maintain a balance between technology and human interaction.

13. Misinformation and Manipulation

AI-generated content, such as deepfakes, contributes to the spread of false information and the
manipulation of public opinion. Efforts to detect and combat AI-generated misinformation are
critical in preserving the integrity of information in the digital age.

In a Stanford University study on the most pressing dangers of AI, researchers said:

“AI systems are being used in the service of disinformation on the internet, giving them the
potential to become a threat to democracy and a tool for fascism. From deepfake videos to online
bots manipulating public discourse by feigning consensus and spreading fake news, there is the
danger of AI systems undermining social trust. The technology can be co-opted by criminals, rogue
states, ideological extremists, or simply special interest groups, to manipulate people for economic
gain or political advantage.”

https://ai100.stanford.edu/gathering-strength-gathering-storms-one-hundred-year-study-
artificial-intelligence-ai100-2021-1-0#misinformation

14. Unintended Consequences

AI systems, due to their complexity and lack of human oversight, might exhibit unexpected
behaviours or make decisions with unforeseen consequences. This unpredictability can result in
outcomes that negatively impact individuals, businesses, or society as a whole.
Robust testing, validation, and monitoring processes can help developers and researchers identify
and fix these types of issues before they escalate.

15. Existential Risks

The development of artificial general intelligence (AGI) that surpasses human intelligence raises
long-term concerns for humanity. The prospect of AGI could lead to unintended and potentially
catastrophic consequences, as these advanced AI systems may not be aligned with human values
or priorities.
To mitigate these risks, the AI research community needs to actively engage in safety research,
collaborate on ethical guidelines, and promote transparency in AGI development. Ensuring that
AGI serves the best interests of humanity and does not pose a threat to our existence is
paramount.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 138


GH1 –TYPES AND DATA STRUCTURES
Strings

1. Read Chapter 8 of Wentworth and work through exercises 1- 5 , 7 and 10 at the end of the chapter
https://openbookproject.net/thinkcs/python/english3e/strings.html:
a. Write a program that inputs a month number (1-12) and prints the name of the month. The month
names should be stored in a List.
b. Modify the program so that it uses a function called monthname, which takes one parameter
(month number) and returns the name of the month as a string. The main program should input the
month number, call the function and print the month name.

Lists

1. Read Chapter 11 of Wentworth and work through exercises 3,4,5


https://openbookproject.net/thinkcs/python/english3e/lists.html
2. Benji has written an algorithm that calculates the multiples of a given number. The algorithm:
a. Prompts the user to enter a number.
b. Calculates the multiples of the number.
c. Stores the multiples in an array.
d. Returns the array.
The pseudocode for the algorithm is shown below.
FUNCTION times_tables()
ARRAY table[10]
base = INPUT("Enter a number: ")
FOR count = 0 TO 9
table[count] = (count + 1) * base
NEXT count
RETURN table
ENDFUNCTION

If the program is run and the value 12,12 is input, how many numbers will there be in
the table array?
i. Emily was organising a competition for a charity event at her school. She needed a program
that would randomly pick four people to participate from her class. She started by creating an
array with the people who donated money from her class.
array donations [8]
After she had added all the names, the array looked like this:
donations = ["Miguel", "Laura", "Mariam", "Arthur", "Musa", "Magda", "Ben", "Diane"]
participants = 0
WHILE participants < 4
pick = RANDOM_INT(0,7) // Gets a random integer between 0 and 7
IF donations[pick] != "Selected" THEN

© NCUK Ltd. 2023 IFY Computer Science TG v.1 139


PRINT(donations[pick])
donations[pick] = "Selected"
participants = participants + 1
ENDIF
ENDWHILE
On the day of the event, if the sequence of random numbers was 4, 1, 7, 1, 3, what was the output
of the program?

Tuples

1. Given the following list data structure, copy and paste it into a Python program and write code to print the
contents in a neatly formatted way, 1 line per student, with no brackets.

students = [
("John", ["CompSci", "Physics"]),
("Vusi", ["Maths", "CompSci", "Stats"]),
("Jess", ["CompSci", "Accounting", "Economics", "Management"]),
("Sarah", ["InfSys", "Accounting", "Economics", "CommLaw"]),
("Zuki", ["Sociology", "Economics", "Law", "Stats", "Music"])]

Queue

1. Write Python code to implement the following queue operations as functions and write a main program to
test them.
a. enqueue(data, Q): the function has two parameters: data to be put on the queue and Q which is a
reference to the queue.
b. dequeue(Q): This function returns -1 if the queue is empty otherwise it returns the item at the
head of the queue.
c. Isempty(Q): This function returns true if the queue is empty otherwise false.
2. Niamh is planning to use a queue as a data structure in her software project. She is designing the
algorithm to enqueue data onto a linear queue based on an array. Can you help her byputting the
structured English statements (shown below) into the correct order?
In the statements, rear is a pointer to the end of the queue and maxsize is the maximum size of the
queue. You must use appropriate indentation.
Else
Increment rear by 1
If rear+1 is equal to maxsize
Insert data at queue[rear]
Display message “Queue is full”
endif

© NCUK Ltd. 2023 IFY Computer Science TG v.1 140


Stack

1. Write Python code to implement the following stack operations as functions and write a main program to
test them.

push(data, S) The function has two parameters: data to be put on the stack and S
which is a reference to the stack

pop(S) The function returns the top element on the stack and removes it

peek(S) The function returns the top element on the stack without removing it

is_empty(S) This function returns true if the stack (S) is empty otherwise false

is_full(S) This function returns true if the stack (S) is full otherwise false

Binary Tree

1. A wildfowl trust tags the birds that visit over the year with a unique number in order to keep track of
them. The details of the birds are stored in a binary search tree for efficient searching.
The numbers from the tags of 13 birds have been entered to a sample binary search tree, and
these are shown in the following diagram of the tree.1.
In what order will the nodes of the binary search tree be visited when the bird with tag number
1999 is searched for?

Linked Lists

1. Consider the following Linked List (from Isaac Computer Science)

Suppose a node containing the number 42 is to be inserted into this list. Explain what steps will take place
to achieve this. You need to include the search for correct position and the steps needed to adjust the
pointers.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 141


HH1 –NETWORKING
If you have difficulty with any of these questions, use the Isaac Computer Science Networking resources
to help you. https://isaaccomputerscience.org/topics/a_level?examBoard=ocr&stage=a_level#all
i. Explain what is meant by the following terms:

Protocol Ethernet
Standard Internet
LAN Wireless Access Point
WAN Bandwidth
NIC Data rate
ii. Explain the difference between a router and a switch.
iii. You have just purchased a new ‘wireless router’ to connect to the Internet via a Fibre
connection that your telecoms provider has just installed. You see that it has several sockets
at the back with the following labels. WAN, LAN1, LAN2, LAN3, LAN4.
a. What do these mean?
b. What protocol will be operating over cables plugged into the LAN sockets?
c. To what should the WAN socket be connected?
d. How do these sockets relate to wireless?
e. You read that the router provides 802.11ac protocol. Look up what this means.
i. Open a command window on a PC and type the command ipconfig/all
f. Look for the MAC (Physical) address and the IP (v4) address. It may have two. What is the
difference between an IP address and a MAC address?

© NCUK Ltd. 2023 IFY Computer Science TG v.1 142


IH1 – SEARCHING
This handout is a slightly modified version of Chapter 5 from the following book: Farrimond, B. and
Herterich, G. (2009) From Data Structures to Java. Liverpool, U.K. Liverpool Hope University pp. 35-42

Introduction
You were introduced to arrays in Topic G. A large part of computing time in the world is spent searching
arrays for information and rearranging (or sorting) information inside arrays. Many techniques are used in
these activities. This section introduces a number of examples.
We shall use the following example of a squash club to introduce searching techniques.
A squash club maintains a ladder competition in which ten of the members are allowed to play. The
ladder consists of a list of the members' names. Any player on the ladder can challenge the player
immediately above, and if the player below wins the order of their names is reversed on the list. Thus,
when the ladder has been in operation for a sufficient time, the order of the names of the players should
correspond to their playing ability, the best player being at the top of the ladder and the worst at the
bottom as in Figure 1 which shows the names stored in an array Ladder.

Ladder 1 Davies

2 Singh

3 Perkins

4 Evans

5 Mason

6 McIntosh

7 Stephens

8 Moore

9 Ahmed

10 Galt
Figure 1
Suppose that we wanted to know the position of a particular member of the club on the ladder. One way
of proceeding would be to go systematically through the ladder array elements until the name is found, at
which point the element index represents the member's position. We would have "searched the array" for
a given name. Searching is a very common activity in computing and there are often many different
methods of searching a given data structure. In this chapter we shall look at two methods of searching an
array.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 143


Linear search

The first method is called the linear search because it goes through the array "looking at" adjacent elements
in turn.

Self-Assessment Question (SAQ) 1.

Which index is produced when the array in Figure 1 is searched for the names
(a) Stephens
(b) Jones?

► Your answer:

SAQ 1 demonstrates the two possible outcomes of all systematic array searching methods, namely that:
(a) the element is found, or
(b) the whole array has been searched and the element is not found.

It is important to note that any array searching method must allow for possibility (b) and must make a
suitable report for that eventuality.

If we know that an element is in an array then the searching process is quite obvious. Begin at element 1
and examine each element in turn until the required element is found.

Self Assessment Question (SAQ) 2.

Write a top-level design in structured English, which will search the array Ladder for the
name Stephens using the process described above.

► Your answer:

In the more general search situation where we do not know, or cannot be sure, that the search item is in
the array then any search design must allow for the possibility that the search will be unsuccessful. Here
is a design which does this: or does it ?

Trace through this design and see if it works for all cases. If not, try and fix it.
READ (SearchItem)
Index =1

© NCUK Ltd. 2023 IFY Computer Science TG v.1 144


WHILE (Ladder[Index] <> SearchItem) AND ( Index <= 10)

Index := Index+1
ENDWHILE
IF (Index>10) THEN
display 'Not found'
ELSE
display 'Found in position ', Index
ENDIF

© NCUK Ltd. 2023 IFY Computer Science TG v.1 145


The binary search

The second search algorithm we shall look at is generally more efficient than the linear search for searching
a list. However, this algorithm only works on a sorted list, so there must be enough searches to justify the
time taken to do the sorting.

The method used in the binary search algorithm involves examining the middle element of the array; if this
is not the required item then the array is cut into two halves and the half which cannot contain the desired
item is discarded. The middle element of the other half of the array is examined and the process is repeated
until there is, ultimately, just one element left. If this is not the required item then we know that the
required item is not present in the array.

As an illustration, suppose that we have to search for Evans in the array of names shown below in Figure
22 which are sorted into alphabetical order:

1 Ahmed

2 Davies

3 Evans

4 Galt

5 Hurst

6 Martin

7 McIntosh

8 Moore

9 Perkins

10 Singh
Figure 22
Each stage of the search is shown below in Figure 33:
1 Ahmed Ahmed Ahmed

2 Davies  Davies Davies

3 Evans Evans  Evans

4 Galt Galt Galt

5  Hurst Hurst Hurst

6 Martin Martin Martin

7 McIntosh McIntosh McIntosh

8 Moore Moore Moore

9 Perkins Perkins Perkins

10 Singh Singh Singh


Figure 33
Each stage of the search is shown with the portion of the array which must contain the required name, if
it is in the array, in a shaded box. First, the name in the middle element of the array or the name in one of

© NCUK Ltd. 2023 IFY Computer Science TG v.1 146


the middle pair of elements in the array, i.e. Hurst in element 5, is examined. Since this is alphabetically
greater than (i.e. after) Evans we deduce that we must keep the first half of the array, which consists of
elements 1 to 4. Next we look at one of the middle elements of this portion, element 2, Davies, after which
we know that Evans must be in the portion consisting of elements 3 and 4. One more stage takes us to the
situation where the remaining portion consists of two elements, and the middle element is the required
name Evans.
Self Assessment Question (SAQ) Error! Reference source not found..3.

Which elements of the array would be examined during a binary search for the name
McIntosh?

► Your answer:

If the required name is not in the array, the binary search proceeds in exactly the same way. For instance,
if we were searching for Edwards the sequence of actions would be exactly the same as in Figure 44 for
Evans, except that the final name examined would still be Evans, indicating that Edwards is not in the array.
This sequence of actions is shown in Figure 44:

Ahmed Ahmed Ahmed Edwards should follow

Davies  Davies Davies  Davies here

Evans Evans  Evans

Galt Galt Galt

 Hurst Hurst Hurst

Martin Martin Martin

McIntosh McIntosh McIntosh

Moore Moore Moore

Perkins Perkins Perkins

Singh Singh Singh


Figure 44

© NCUK Ltd. 2023 IFY Computer Science TG v.1 147


Self Assessment Question (SAQ) 4.

The nine elements of the array ProductCode contain, in ascending order, the code numbers
of nine products sold by a company. These values are shown below.
ProductCode 1 123
2 196
3 207
4 318
5 456
6 629
7 730
8 789
9 841
Determine the elements which are examined by the binary search algorithm in looking for the
code numbers (a) 318 and (b) 465 .

► Your answer:

Summary
In this chapter, two important searching techniques for arrays have been introduced:
a. linear search
b. binary search
After completing this chapter, you should be able to:
 describe the operation of a linear search.
 explain how to cope with a searched for item not being present.
 explain how a binary search works.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 148


IH2 – SORTING
This handout is a slightly modified version of Chapter 5 from the following book: Farrimond, B. and
Herterich, G. (2009) From Data Structures to Java. Liverpool, U.K. Liverpool Hope University pp. 42-45.
Reproduced with permission.

Introduction
Sorting is a common operation in computing and fast, efficient sort algorithms save time and money in
many situations. There are many sorting algorithms in existence. In this book we shall examine one
simple sorting algorithm in order to establish the issues involved in sorting.

Exchange sort
The method is called exchange sort or bubble sort. The algorithm passes through the array one element
at a time, comparing each element with its neighbour. If they are out of order, they are swapped. So, the
first element is compared with the second, the second with the third and so on. At each comparison, if
elements of the pair are out of order they are swapped. When the end of the array is reached the
process is repeated from the beginning. Each movement through the array is called a pass. The effect of
each pass is that one element at a time is moved to its correct position in the sorted array, starting with
the largest element. Consider the array in Figure 5:

1 Davies

2 Martin

3 Perkins

4 Evans

5 Mason

6 Ball

7 Stephens

8 Moore

9 Hurst

10 Galt

Figure 5
When the exchange sort is used on this array, the array is changed as shown below.
The emboldened names are compared and if they are out of order, they are swapped. The diagram should
be read left to right then top to bottom, there are sequence numbers to show the successive state of the
array.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 149


1 2 3

Davies Davies Davies

Martin Martin Martin

Perkins Perkins Perkins

Evans Evans Evans

Mason Mason Mason

Ball Ball Ball

Stephens Stephens Stephens

Moore Moore Moore

Hurst Hurst Hurst

Galt Galt Galt

4 5 6

Davies Davies Davies

Martin Martin Martin

Evans Evans Evans

Perkins Mason Mason

Mason Perkins Ball

Ball Ball Perkins

Stephens Stephens Stephens

Moore Moore Moore

Hurst Hurst Hurst

Galt Galt Galt

7 8 9

Davies Davies Davies

Martin Martin Martin

Evans Evans Evans

Mason Mason Mason

Ball Ball Ball

Perkins Perkins Perkins

Stephens Moore Moore

Moore Stephens Hurst

© NCUK Ltd. 2023 IFY Computer Science TG v.1 150


Hurst Hurst Stephens

Galt Galt Galt

10

Davies

Martin

Evans

Mason

Ball

Perkins

Moore

Hurst

Galt

Stephens

Figure 2
At the end of the first complete pass through the array, Stephens, the last member of the list alphabetically,
is placed in its correct position. Like a bubble, it has risen to the top of the list. The second pass then
repeats the process, starting with the first element, comparing adjacent items and swapping them if they
are out of order.

Self Assessment Question (SAQ) 1

How many passes will be required to guarantee that the array is completely sorted using the
exchange sort?

► Your answer:

A first design for this sort is:


FOR each pass
FOR each element
compare with the adjacent element
IF out of order THEN
swap them
ENDIF
END FOR
END FOR

© NCUK Ltd. 2023 IFY Computer Science TG v.1 151


It’s Nesting Time Again!
A more detailed design for an array with N elements is:
FOR i from 1 to N - 1
FOR j from 1 to N - 1
IF the jth element is greater than the (j+1)th element THEN
swap them
ENDIF
END FOR
END FOR

This is very inefficient: can you see why?


Can you make it better?
The speed at which a sort can be carried out can be increased in a number of ways but they are beyond
the scope of this book. An important high speed sort is quicksort.

Summary
This chapter has described a straightforward sorting technique called the exchange sort. This is rather
slow and better methods exist including quicksort.

After completing this chapter, you should be able to:


 explain how the exchange sort works.
 be aware that there are faster, more efficient sorts available.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 152


IH3 - ALGORITHM EXERCISES
Searching

1. Read Handout IH1 and complete the Self-Assessment Questions (SAQs).


a. Write a python program to search for a name in an unsorted list using the linear search. The
program should read in the name and output either : “name found and the index” or “name not
found”
b. Write a python program to search for an integer in a sorted list of 20 integers. It should use
the binary search algorithm. The program should read in a number and output either :
“number found and the index” or “number not found”

Sorting

1. The records in the file marks.txt contains 9 records which are to be sorted into alphabetical order of
name using a sort algorithm. Two arrays have been defined to hold the names and marks. The arrays
are studentNames[0..8] and studentMarks[0..8].
Complete the code at A, B, and C to sort and print the records.
The following algorithm has been written.
studentNames = [" ", " ", " ", " "," ", " ", " ", " ", " "]
studentMarks = [0, 0, 0, 0, 0, 0, 0, 0, 0]
OPEN markFile in “READ” mode
PRINT ("names and marks will be stored in two arrays")
FOR n = 0 TO 8
READ markRec from markFile
Split record into two fields name, mark
studentNames[n]  name
studentMarks[n]  mark
ENDFOR
markFile.close()

#sort the records


FOR i = 0 TO 8
FOR j = 0 TO (7 – i)
IF studentNames[j] > studentNames[j+1] THEN
A

#now sort marks too

ENDIF
ENDFOR
ENDFOR
# print sorted names and marks

C
© NCUK Ltd. 2023 IFY Computer Science TG v.1 153
1. Read Handout IH2 (sorting) and complete the Self-Assessment Questions (SAQs).
2. Write a program to implement bubble sort in Python. You should sort a list of integers and print
out both the unsorted and unsorted lists to check it works. It is useful to print out the partially
sorted list each time round the main loop, to show the algorithm working.
3. Look up Python’s the built in methods for sorting (search for sorted() method).
4. Anil has been keeping a record of his daily step count and has recorded the data in an array as
shown below.

Steps

14577 12434 12113 12566 12321 12707 10350

To sort the data, into ascending order, Anil will follow the merge sort method.
In the current step of the algorithm (step 3), the original list has been split into seven sub lists and
these can now be merged.
Step 3:

List 1 List 2 List 3 List 4 List 5 List 6 List 7

14577 12434 12113 12566 12321 12707 10350

What will Anil expect to see as a result of the next step (step 4) which starts the merging of the
seven sub lists?
Step 4:

a List 1 List 2 List 3 List 4

14577 12113 12434 12566 12321 10350 12707

b List 1 List 2 List 3 List 4

12434 14577 12113 12566 12321 12707 10350

c List 1 List 2 List 3 List 4

14577 12434 12566 12113 12707 12321 10350

d List 1 List 2 List 3 List 4

14577 12434 12113 12566 12321 12707 10350

5. Implement the merge sort algorithm in Python.

Exercises on algorithms

1. Consider the following algorithm for converting a decimal number into a binary number:
a. Obtain a decimal number from the user and store it in an integer variable named N.
b. Perform an integer division to divide this number by 2 and store the result in N.
c. Store the remainder in the next available position in an array.
d. Repeat the above two steps while N is greater than zero.
© NCUK Ltd. 2023 IFY Computer Science TG v.1 154
The result is obtained by printing the array in reverse order.
 Trace the steps in this algorithm to show what happens step-by-step when the initial decimal
number is 10.
 Provide code in Python that shows how this algorithm might be implemented as a function or
procedure. Your answer should include the code necessary to invoke the function or procedure.
This will prompt the user for a decimal value and output the answer as 8 binary digits.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 155


JH1 – SECURITY
In order to develop a deeper understanding of the important concepts in this topic, research the
following terms and summarise answers in your own words. A good place to start is
 https://isaaccomputerscience.org/?examBoard=all&stage=all
 https://onlinedegrees.sandiego.edu/top-cyber-security-threats/
1. Explain what the following threats are, and their effects.
a. Malware
b. Social Engineering
c. Phishing
d. DDOS attack
e. Ransomware
f. Third party vendor vulnerabilities
2. Individually research and define the current top 5 threats and impact in terms of cost, don’t forget to
record your references. Compare your list with another student and discuss similarities and
differences. How reliable do you think the sources were, can you explain any differences?
3. Read Handout JH2 and summarise the actions that an organisation can take to minimise the risk of
ransomware attack.
4. Download and skim read the guidance from UK National Cyber Security Centre 10 Steps to Cyber
Security https://www.ncsc.gov.uk/collection/10-steps.
a. Summarise the recommendations.
5. Read the information for families and individuals from NCSC. How many of their recommendations
are you already using?

Encryption

1. Caesar's friend Brutus is desperate to know what type of sandwich Caesar has ordered. He has
decided to use 'brute force' to decrypt the message. What is the maximum number of keys that he
would have to try out?
2. The following message has been encrypted using the Caesar Cipher:
a. WHYVHF PNRFNE NHGUBEVFRQ GUR GUERR UHAQERQ NAQ FVKGL SVIR QNL
WHYVNA PNYRAQNE
b. You have not been told the key (number of letters shifted), so you will need to work it out.
c. When you have successfully decrypted the message, you will find that the plaintext contains a
number.
3. Encryption is the process of scrambling data so that it is no longer understandable. An encryption
algorithm and a key is used to encrypt the data by the sender and decrypt the data by the receiver. A
common encryption algorithm is the Caesar cipher. In a Caesar cipher with a +5 key, what would the
word "exciting" be once encrypted?
a. jchnynsl
b. nhlrcrxp
c. jglrcrwp
d. jcinymsl

© NCUK Ltd. 2023 IFY Computer Science TG v.1 156


JH2 - ANATOMY OF A CYBER ATTACK (& WHAT TO DO!)
Andrew Radford 4-Sep-22 Securus communications
https://securuscomms.co.uk/anatomy-of-a-cyber-
attack/#:~:text=The%20anatomy%20of%20a%20cyberattack,user%20devices%20and%20IT%20systems
Cybercrime has become a big business as tech-savvy criminal gangs are becoming increasingly skilled,
causing larger corporations to employ dedicated cyberattack security teams. Cybersecurity goes beyond
security professionals.
Security is everyone’s job, from system administrators down to individual users, and education is the first
line of defence. Understanding the anatomy of a cyber-attack will help prevent and mitigate ransomware
and data theft.
The anatomy of a cyberattack has six components: reconnaissance, initial access, attack deployment,
attack expansion, getting paid, and cleanup. At each phase, companies and individual users can take
positive steps to protect user devices and IT systems.

1. Reconnaissance
At the beginning of every cyberattack is reconnaissance as criminal gangs begin by researching the
target organisation. They scan for IP addresses, network ranges, domain names, and email addresses
within the organisation, like IT professionals, CFOs, and CTOs.
They may also gather employee email addresses to use later for phishing emails. Next, attackers scan
for network vulnerabilities; this is a process that can take months. Here are some of the ways
cybercriminals gather information.

Assessing Corporate Websites


Corporate websites yield a plethora of information, and it is one of the first places a hacker will look.
If the website has structural vulnerabilities, they can use it as the point of attack and continue
searching for weaknesses in other systems.
Companies should keep their websites, plugins, and firewalls up to date and be sure to contract with
a reputable hosting provider. Only authorised users should be accessing the site at the administrator
level.
Criminals also use corporate websites to gather information about employees listed on the site. This
is like the ‘yellow pages’ of who’s who, and this information aids in creating phishing and social
engineering attacks.

Reviewing the Company’s Social Media Footprint


Another source for spear-phishing and whaling attacks is social media sites like LinkedIn. Spear
phishing involves using believable emails tailored to the recipient. Whaling is similar, though the
targets are individuals at higher levels within the organisation, such as the CFO or CEO.
Employers should monitor corporate social media accounts for sensitive information and secure any
data that could lead to an issue. Staff should also be trained on social media threats and follow
security guidelines.

Assessing Your Corporate Network


Cybercriminals check the strength of your network. With so many mobile workers, endpoint security
is an issue, and security vulnerabilities can exist anywhere a device connects to the corporate
network.
Companies should invest in robust cybersecurity systems, which include firewall security, email
security, and antivirus and anti-malware protection systems for the network and the devices that
access it.
© NCUK Ltd. 2023 IFY Computer Science TG v.1 157
2. Initial Access
The goal of a cybercriminal is to infiltrate an organisation’s network; however, they need access
privileges to do that. They use various means of phishing to acquire credentials, which often
upgrades their access to administrator privileges.
Once hackers gain access to their target network, they spend time discreetly reviewing systems. They
assess what they see, including the security systems and sensitive databases, and investigate ways to
gain access. This ‘initial access ’stage can go on for months, sometimes years.
Often, cybercriminals gangs discover vulnerabilities through third-party businesses or other systems
that are part of the target company’s broader network environment.
For instance, some attacks may begin at operational network points such as office maintenance
systems, fire alerting, and air conditioning systems. These criminals simply need a single entry point
for initial access and can travel undetected from there.

3. Attack Deployment
This ominous stage begins the moment hackers launch their full-scale attack. Such a raid could
involve removing data from your company’s network (exfiltration), service disruption, or the hacker’s
latest favourite, ransomware.
Ransomware is malicious software spread by malware that encrypts the victim’s data, and hackers
then extort a ransom to release the data by giving the company an unlock code. In today’s tech world,
ransomware is the primary reason businesses remain at risk of encryption-based malware corrupting
their systems.
Once ransomware is successfully deployed, the company must choose to either pay the ransom or
risk losing critical data. What’s worse, there’s the likelihood that the company will lose its data, even
if they pay the ransom. Most companies hit by a ransomware attack never recover their data.
Most ransomware makes its way into a network through links contained in malicious emails. Phishing
often appears as fraudulent texts, emails, and websites trick victims into providing sensitive
information like passwords, login credentials, and credit card information. Phishing emails can also
deliver malware and viruses that can upend your business operations altogether.

4. Attack Expansion
The anatomy of a cyberattack includes an expansion phase that describes how hackers use malicious
software to intrude on all systems connected to the network. These programs enable attackers to
hide within multiple systems and regain network access even after they are detected.
For example, if the intruder gains access to customer accounts or third-party vendor accounts that
connect to the company network, they open the door to breaching those 3rd party networks.
As these compromised 3rd party user and vendor accounts are recognised parts of the network
ecosystem, the hacker no longer needs higher access to infiltrate the network.

5. Getting Paid
Ransomware is a common cyberattack trend that compromises a user’s mobile device or workstation
via malware. The attack encrypts the user’s data so they can’t access it.
Such ransomware eventually spreads to other computers on the company network, distributing the
same damage to each device, including servers and data backup storage systems. It’s payday for
cybercriminals.
The victim will eventually be asked to contact the attacker by email or sometimes through a
dedicated web page and directed to make a ransom payment in return for their data being
unencrypted. The demand payment is often a cryptocurrency like Bitcoin because it is untraceable.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 158


The company may choose to pay the ransom, though that’s not a guarantee that they will recover the
files. Too many times, the victims’ files are never recovered. In fact, sometimes the intent is data
theft, and there is never a ransom. The criminals know they will make money by selling sensitive data
on the dark web.

6. Cleanup
Cleanup is the last step in the cyber-attack process. Sophisticated attackers take time to remove
evidence of their presence in the victim’s network and systems.
They clean out logs to remove any history of their presence. Covering their tracks in this way allows
them to get away. But it also allows them to reinfiltrate the network at a future time.
To help counter this, companies should be diligent about cyber security alerting and logging. Detailed
logging can help organisations detect and recover from security events. It also allows your security
team to give all your devices a check-up to ensure they are updated and in compliance with security
policies.

How to Prevent a Cyber Attack


Despite the growing challenge of defending against a cyberattack, there are several measures
companies can take to mitigate the damage they cause.

Backups
First and foremost, companies must have a solid backup strategy as part of their business continuity
and disaster recovery plans. In the event ransomware pushes past security, having backups increases
the organisation’s chances of recovery.
IT teams should maintain regular daily and monthly backups and store them in more than one
location. At least one of those locations should be in an offsite physical location to isolate it from the
enterprise network altogether. At Securus, we highly recommend adopting an immutable backup
solution.

Email Filtering and Alerting


Most often, ransomware enters a network through a phishing email that contains a link or attachment
sent via email. An employee clicks a link and releases ransomware.
One way to combat this is email filtering, which most modern email solutions have built-in but are
not always fully enabled or configured. Email filtering software analyses incoming emails and flags
potential spam and phishing content, which security admin teams should fine-tune.

Antivirus Software with Ransomware Protection


EPP software suites and most antivirus software utilities usually include ransomware protection,
especially now that ransomware is on the rise. Be sure your EPP or antivirus software solution is up
to date across the network, down to each individual device.
Remember, this includes devices with limited security protection, including personal devices not
issued by the company, BYOD, and IoT devices that sometimes lack security features straight out of
the box.

Employee Security Education and Awareness


Cyberattacks are possible because users click malicious links or inadvertently give away access
credentials through phishing and other social engineering attacks.
It is vital that employees should receive adequate cybersecurity training on recognising phishing
emails and handling sensitive data. What may seem like an expensive initial outlay can pay dividends
if a full-scale ransomware attack is avoided.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 159


Security Patching
A critical part of any security protocol is applying the latest patches to operating systems, devices,
and applications. Software suppliers release patches that address specific vulnerabilities and
announce this in security news updates.
The downside is that this also notifies cybercriminals of these vulnerabilities. If your organisation
does not install a patch immediately, it’s left open for hackers to exploit from the moment the
vulnerability is identified (also known as day zero attacks).

Disaster Recover (DR) Plan


A formidable DR plan ensures business continuity in the event of a security breach, and a critical part
of any DR plan is data protection. A DR plan reduces the impact of ransomware attacks and enables
your organisation to restore business operations quickly.
As mentioned earlier, at Securus, we highly recommend that all our customers consider adopting an
immutable backup solution. Not sure what immutable backup is? No problem; here is a link to
our immutable backup deep-dive article.

Conclusion
Businesses must make cybersecurity a priority. Data protection is a crucial part of any cybersecurity
strategy. Understanding the anatomy of a cyberattack is the first step to understanding how to
protect enterprise networks.
At each phase of the attack, there are protections organisations can put in place to either prevent or
mitigate the damage. You may think that your final saviour will be your backups; however, any
respectable ransomware attack will encrypt that backup data too. Hence we feel that an immutable
backup is the backup solution of the future.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 160


KH1 –PROGRAMMING LANGUAGES AND PARADIGMS
In order to develop a deeper understanding of the important concepts in this topic, research the
following questions and summarise answers in your own words. A good place to start is
https://isaaccomputerscience.org/?examBoard=all&stage=all the following sections are links to relevant
content.

Programming paradigms
a. Programming paradigms
https://isaaccomputerscience.org/concepts/sys_proglang_high_level?examBoard=all&stage=al
l
b. Procedural-oriented programming
https://isaaccomputerscience.org/topics/procedural_programming?examBoard=all&stage=all
c. Object-oriented programming
https://isaaccomputerscience.org/topics/object_oriented_programming?examBoard=all&stag
e=all
d. Fundamentals of Functional Programming
https://en.wikibooks.org/wiki/A-
level_Computing/AQA/Paper_2/Fundamentals_of_functional_programming
1. Find out more about the following languages: Java, C, C++, Visual Basic, PHP, JavaScript, Kotlin, F#.
a. Are they high level or low-level languages?
b. Are they compiled or interpreted?
c. What is their primary application area: special purpose- if so, what purpose or general
purpose)
d. Are they primarily procedural, object-oriented or functional?
2. The Object-Oriented paradigm is now the most important for developing systems. Find out more
about Object Oriented Programming (OOP):
a. Write short definitions of these terms:
i. Object, Class, Attribute, Method, Inheritance.
ii. What parallels can you draw with the procedural programming terms: function,
variable?
iii. Find a small example.
iv. What are the claimed benefits of OOP.
3. The Functional Programming paradigm makes heavy use of a technique called recursion. Find out
what this means and find a small example.

Software Development process


4. Use the Isaac Computer Science site to review the main stages of the SDLC
(https://isaaccomputerscience.org/concepts/prog_softeng_stages?examBoard=ocr&stage=a_level).
You need to make brief notes as to the purpose/ activities of each stage and the outputs from each
stage.
5. A traditional method of software development, e.g. the waterfall lifecycle, is a sequential approach:
each stage is carried out and completed before the next begins. Some of the stages are listed below.
Put them in the correct order in line with the traditional sequential approach.
Development Analysis
Maintenance Testing
Design Feasibility study
6. A well-defined set of system requirements should be SMART. What does the acronym 'SMART'
stand for?
a. Stated, Measurable, Achievable, Relevant, Time-bound
b. Stated, Measurable, Achievable, Relevant, Tested
© NCUK Ltd. 2023 IFY Computer Science TG v.1 161
c. Specific, Measurable, Achievable, Relevant, Time-bound
d. Specific, Measurable, Achievable, Relevant, Tested
7. What type of approach to software development is described by the following summary?
A prototype is created, then it is evaluated, and the feedback is used to inform the next version. Any
changes that have been identified are made, and the process is repeated until the prototype becomes the
final product.

© NCUK Ltd. 2023 IFY Computer Science TG v.1 162


LH1 ETHICS AND THE IMPACT OF COMPUTING
1. Skim read the EU GDPR introduction at https://gdpr.eu/what-is-gdpr/ and answer the following
questions:
a. Who does it apply to?
b. What are the 7 data protection principles
c. What is the maximum fine for a breach?
d. If you collect personal data, for example in a survey, what must you do?
e. Do you have a right to view the data that your employer holds about you?
f. Consider the following case:
"Maria works for a secondary school in the UK and has access to users' personal data, such
assessment results, details, date of birth, and address. She uses a USB flash drive to make a copy of
her work daily to act as a backup file just in case the power goes down and she can’t use her
computer to retrieve the information. However, one afternoon, she left the school, and by mistake
she took the USB flash drive home together with her belongings. The next morning, she looked for
the USB flash drive and she couldn't find it. She informed her manager what had happened and the
incident was escalated to the school management team and who reported the data breach to the
Data Protection Officer."
i. What aspect of GDPR has Maria broken?
ii. What do you recommend the organisation should do?
2. Research your local data protection legislation – find a summary of it.
a. What similarities and differences does it have to GDPR?

© NCUK Ltd. 2023 IFY Computer Science TG v.1 163


TEACHER GUIDE UPDATE HISTORY

Release Version Summary of Main Changes Author


Date No.
August 1.0 New Guide developed Dr Chris
2023 Beaumont PhD.
FBCS FHEA
NCUK Product
Team

This guide should be used alongside the relevant version of the IFY Computer Science syllabus .

© NCUK Ltd. 2023 IFY Computer Science TG v.1 164


NCUK – The University Consortium

WeWork, No1 Spinningfiel ds, Quay Street, Manchester, M3 3JE, United Kingdom

Tel: +44 (0)161 549 9220

www.ncuk.ac.uk

©NCUK Ltd.
© NCUK Ltd. 2023 IFY Computer Science TG v.1 0

You might also like