You are on page 1of 28

Executive Preview

Cambridge
Lower Secondary
Computing

We are working with Cambridge Assessment


International Education to gain endorsement
for this forthcoming series.

Cambridge Lower Secondary Computing 4pp A4_3.0.indd 1 11/05/2022 12:43


Unit 8.4 Testing conditions: Developing games

Cambridge
SCENARIO

Lower Secondary
Younger children need to understand the importance
of secure passwords. Your school wishes to promote
online safety and, as a programmer, you have been

Computing
asked to create a text adventure game for young Warm Up, Get Started,
children aged 8–10 years old. The game should Learn, Practise, Go Further
provide the children with some different pathways to Challenge Yourself activities are
and
follow as they progress through a story. Unit Testingdesigned toconditions:
actively engage students
The child will play the main character in 8.4 the game.
Developing
through discussionsgames and teamwork,
along with questions designed to
Key They need toof
features find
thethe Chocolate Room in a sweet support differentiation.
shop. They will meet a robot and theGet sweet-shop
Student’sowner on their Books journey.
started!

Have you ever played a game where you had to make choices?
When they find and enter the Chocolate Room,
Discuss the following with a partner:
there will be two questions. If the child answers What sort ofthe decisions did you make in the last game
l

you played?
questions correctly, they will be given three letters
Did you notice that the game progresses differently,
l

from a four-letter password. They then have depending to onguess


which choices you made?
A range of real-life Have you every played a game that contained bugs?
the password, after being given a clue.Computer If theyprograms
guessneed to be able to check
l

scenarios to show Unit 8.4choices


user Testing conditions: Developing games
the password
how computers and correctly, they open a digital
and treasure
other conditions. chest
They alsoand win
need to the
be tested game.
to make
sure that the program runs correctly for everyone.
otherYour challenge
machines are is to examine existing Challenge program
In unit, youcode
thisyourself! and find
will use Python outand
to develop what it does,
test computer correct
games that run errors
different in
the code and
interconnected complete the game.Your challenge
and how sections of code, depending on the user’s input.
is to write a new text adventure game. The game is set in a series of tunnels
theyYou
play need
a vital to
roleuse
in athe different sample code provided by your teacher.
and the object of the game is for the player to find a key in one of the tunnels and then to
Unit 8.4 Testing conditions: Learning
Developing
find their way to gamesoutcomes
the exit. The exit is blocked by a gate that is unlocked by the key.
range of industries.
You will add new code, edit code and test In this any changes
unit, you will learn to:made to the code to make sure that it
SCENARIO
works correctly. create and follow a flowchart that uses conditional statements
l
Younger children need to understand the importance l develop programs in Python that use conditional statements
of secure passwords. Your school wishes to promote l understand how AND, OR and NOT can be used in algorithms
online safety and, as a programmer, you have been
l develop programs in Python that use AND, OR and NOT
asked to create a text adventure game for young
children aged 8–10 DID yearsYOU
old. The KNOW?
game should l develop programs in Python using different data types
KEYWORDS
provide the children with some different pathways to
The first adventure games for computers were text adventure games. This was because l develop programs using an iterative process text adventure game:
follow as they progress through a story. l develop and apply a test plan
the computers were not powerful enough to display good graphics. A famous example a game in which
sweet you can still play online today. Search forKeywords
The child will play the main character in the game.
They need to findisthe the gameRoom
Chocolate Zork, in awhich
l understand the need for using a range
one of the early inofeach
test data the player types in
l test a program using suitable test data.
shop. They will meet a robot and the sweet-shop
Zork games online to find out the quality of the graphics computers of that time unit explain new terms commands to control
owner on their journey.
could display. encountered thereby the main character
When they find and enter the Chocolate Room, Warm up
there will be two questions. If the child answers the expanding student’s program code: the
questions correctly, they will be given three letters In pairs, think about your journey to school this morning. What Python
conditionscode created
did you or your
from a four-letter password. They then have to guess The game has the following vocabulary.
features: These
parents have to check before leaving home? For example: in the IDLE
Do you remember?
the password, after being given a clue. If they guess
the password correctly, they open a digital treasure chest and win the game.
l The player always walks forwards
l Have you eaten any food?
are also available
through the as
tunnels — they
l Have you brushed your teeth?
can’t go
arithmetic
backwards.
operators:
l The first tunnel ends at a junction. At the first junction, the player can either take the
Your challenge is to examine existing program code and find out what it does, l Is your schoolbag packed?
correct errors in flashcards. l Are the doors locked?
left tunnel, the middle tunnel or the right tunnel. +, – , *, / and other
the code and complete the game. Make a list of all the conditions you can both think of.
Before starting this unit, you should
You need to use the different sample code provided by your teacher.
l Each of be those able tunnels to:also ends in a junction where the player symbols can go left, that
middlecanor be
right.Most Thiscomputer
means that programs
there arealsoup
check conditions
to nine possible asdestinations
they are running.
in theThe conditions
game. Only one depend
You will add new code,✔ createedit code and an testalgorithm
any changes madeusing to the codeflowchart
to make
of thosesure
on whatthatsymbols
itthe program
destinations is thedoes.
exitInwith
thisthe
unit,gate. used for arithmetic
you will see how a game, written in Python, checks
works correctly. conditions to allow agames
player
thetokey
movefor through
the exit.it.You
Youmust
will also see the
howgame
important it isthe
to test the
✔ understand the logic ofUnitAND, 8.4 Testing
l One
OR
player
conditions:
of the tunnels
and
game,
can so reach
Developing
NOT
thatthe
contains
it works correctly
exit from for every
the tunnel possible
that has the choice.
design so that
key — otherwise the game can
DID YOU KNOW?✔ understand the difference between never be won!
KEYWORDS integer, real and string
Computational
The first adventure games for computersthinking
were text adventure games. This was because The
l text junction
adventure game:containing the final exit must test whether the player has selected the
data
the computers were not powerful enoughtypes
to display good graphics. A famous example a game in which
correct direction
4the player types in and if they have the key in order for them to win the game.
is the game Zork, which you can still play online today. Search for one of the early
to✔
✪ Look
Zork games online findatknow
outthe
thecode how
qualitybelow onto develop
thecomputers
of the graphics left. Discuss
of thatwithprograms
time Some
a partnerlwhat
commands
the in
characters,
of
Python
tothe
output other
control bewith
would tunnelsif youcan inputs
have a range of different features, such as human
monsters, dead-ends or hazards. You can design these features as you
could display. enter the following values: x=4, y=7; x=8, y=8; x=11, y=21. the main character

✪ Look atand outputs program


wish —code: the
the code below on the right. Which message will bePython output ifbe
code you imaginative!
enter the
created
following values: l inThe player must pick up points every time they move through a tunnel, but they can
use variables in Python
Comp_L_Sec_Sample.indd 4 8/12/21 2:07 PM
the IDLE
Do you remember? ✔
x=5, y=4, z=11 also lose
arithmetic points — for example, if they
operators: A range
set off of real-world
a trap. The game tasksshould and
update their
Before starting this ✔ unit,use
x=7, y=7, z=99
youarithmetic
should be able to: operators in Python
+,score
– , *, / and
using
symbols that can be
othera variable and give them problems
their scorewhich require the use
at the end.

of computational thinking
x=12, y=21, z=0
✔ create an algorithm using flowchart symbols used
The for arithmetic
game should ask for the player’s name at the start of the program and then address
✔ to debug a program.
✪ Create a set of values for x, y and z so that the message ‘Hello world’ is output.
✔ understand the logic of AND, OR and NOT them by their name throughout the game. If the player does not enter a name, then the
✔ understand the difference between integer, real and string code containing the rest of the game should not execute. to break down the task/problem
data types
✔ know how to develop programs in Python with inputs
into smaller parts and use logical
You should design your game using a flowchart algorithm before writing any code. Once
you have written your program, you should write a test plan and then test the game using
and outputs
suitable test data.
thinking to write instructions in
✔ use variables in Python
✔ use arithmetic operators in Python the correct sequence. 5
✔ to debug a program.

13

Comp_L_Sec_Sample.indd 5 Comp_L_Sec_Sample.indd 13 8/12/21


8/12/21 2:07 PM 2:07 PM

Comp_L_Sec_Sample.indd 5 Go further 8/12/21 2:07 PM

Once the player has answered the robot’s question, they enter the Chocolate Room, where
To request eInspection copies, visit
they find the sweet-shop owner. She will ask the player a question, as follows:

hoddereducation.com/cambridge-lowersec-computing
Which of the following could be used as a good password?
1. Your pet’s name
2. Password123
3. A random set of numbers and letters.

The correct answer is 3. If the player enters 3, they can then pick one of two chocolate
bars by entering a number 1 or 2.
l If the player picks chocolate bar 1, there is no information in it and they lose a life.
Cambridge Lower Secondary Computing 4pp A4_3.0.indd 2 11/05/2022 12:43
l If the player picks chocolate bar 2, the letter ‘T’ is inside the wrapper.

If the player gives the wrong answer (1 or 2) to the owner’s password question, they lose
Computing
7
8
Ben Barnes
Margaret Debbadi
Pam Jones
Tristan Kirkpatrick
9
SERIES EDITOR:

Lorne Pearcey

Computing Combined Title Page.indd 1 13/09/2022 11:27


XXXXXX_Marketing Sample.indd Page 1 14/09/22 9:58 AM user /102/HO02637/work/indd/Marketing%20Sample

DRAFT CONTENT - NOT YET APPROVED

Contents
Stage 7 Learner's Book

Introduction

7.1 Block it out: Moving from blocks to text

7.2 Decomposing problems: Creating a smart solution

7.3 Connections are made: Accessing the internet

7.4 The power of data: Using data modelling

7.5 Living with AI: Digital data

7.6 Sequencing and pattern recognition:


Getting the message across

Glossary

Index

Acknowledgements
369320_C5_Che_LS Comp7_SB_150-181.indd Page 150 23/08/22 11:54 AM user /102/HO02571/work/indd

DRAFT CONTENT - NOT YET APPROVED

Unit Living with AI: Digital data


7.5
Get started!
How often have you used a digital device to
help you make a decision at home or at school?
In a small group, make a list of examples where you
have used digital devices in this way, for example:
l Using the TV listings screen to select a program
to watch
l Looking at your phone’s calendar to decide
when you are free to visit a friend’s house
l Asking a digital assistant what the weather will
be like to help decide on a suitable activity for the weekend.
Have you ever considered how the devices we use in these situations are able to operate the
way we need them to? All digital devices require a software application to enable users to
interact with them and to allow users to make a decision, solve a problem or complete a task.
In this unit, you will examine how digital devices use components called logic gates to help
make decisions. You will look at the different types of software used by digital devices
and some of the complex programs used to help users in real-life scenarios. You will also
explore how some of these software applications work and how they store data in the form
of text, images, sound and numbers.

KEYWORDS
digital device: a piece of physical equipment that uses digital data
digital assistant: an electronic device that can be used to help a user
complete tasks such as switching on other appliances, controlling heating
systems, searching the internet for information or organising music play lists

Learning outcomes
In this unit, you will learn to:
l explain the difference between systems software and application software
l explain what AI means
l describe how AI enables a computer to use information from its surroundings to
produce an output
l evaluate the design of a device or an AI system
l explain how AI works in a range of applications
l explain how AI helps automate the completion of tasks in some industries
l explain how image recognition is used in some AI applications
l describe how an analogue image is converted into digital format
l explain what a binary number is and how it represents different data
l explain what a logic gate is and describe what is meant by Boolean logic
l explain how AND, OR and NOT logic gates work in a circuit.

150
369320_C5_Che_LS Comp7_SB_150-181.indd Page 151 23/08/22 11:54 AM user /102/HO02571/work/indd

DRAFT CONTENT - NOT YET APPROVED

Unit 7.5 Living with AI: Digital data

Warm up
Many of the devices you interact with on a daily basis use
artificial intelligence (AI). But what is AI?
In pairs, discuss the following questions:
l What do you think is meant by the
term artificial intelligence?
l What does the word artificial mean? You may want to
l How do we decide whether discuss the meaning
something is intelligent? of intelligence first!
Discuss how you would describe
intelligence in a person.
l How can you use your answers to the question above to help
you decide whether a digital device is intelligent?
In this unit, you will explore how digital devices use AI to help us
with daily decision-making. You will find out how software and
hardware work together to create an ‘intelligent’ device and how
these devices help to automate actions.

KEYWORDS
artificial intelligence: an area of computing that focuses on creating
intelligent computers that can mimic the way humans think and make
decisions; a computer system able to perform tasks normally done using
human intelligence, such as understanding speech
automate: to reduce human interaction and leave the running of a
device to use sensors to determine the output

151
369320_C5_Che_LS Comp7_SB_150-181.indd Page 152 23/08/22 11:54 AM user /102/HO02571/work/indd

DRAFT CONTENT - NOT YET APPROVED

CAMBRIDGE LOWER SECONDARY COMPUTING 7

SCENARIO
Your school has decided to introduce the use of an AI system to help students learn
independently. The teachers have produced a very basic design and have jotted down some
ideas about how the system will collect and use some data and how the system will operate.
They have asked you to evaluate the design and make some recommendations on how to
improve the design to make sure that the AI system they are planning on creating can:
l help increase student learning
l make learning enjoyable
l help reduce teacher workload.

Before you can fully evaluate the AI system the school is designing, you need to learn more
about AI computer systems.

DID YOU KNOW?


Many people think of AI as being
related to robots, but a lot of digital
devices and systems in modern
homes now use AI. Some examples
include smart heating systems, digital
assistants and smart fridges. All of
these devices use technology known
as smart technology.
Do any devices in your home use
smart technology?

KEYWORD
smart technology: SMART means ‘Self-Monitoring, Analysis and Reporting
Technology’; technologies that use AI to support their operation

Do you remember?
Before starting this unit, you should be able to:
✔ identify the difference between analogue and digital data
✔ explain why analogue data needs to be digitised to be
processed by a digital device
✔ explain some ways in which robots can operate without
human interaction
✔ identify some of the advantages and disadvantages of using
robots to complete a range of tasks.

152
369320_C5_Che_LS Comp7_SB_150-181.indd Page 153 23/08/22 11:54 AM user /102/HO02571/work/indd

DRAFT CONTENT - NOT YET APPROVED

Unit 7.5 Living with AI: Digital data

Applications and systems software


Learn
All digital devices need software. Software is the term used to describe the program or
instructions that tell a digital device how to complete a task. Software can fall into two
main groups:
l Systems software
l Applications software.

Systems software is the software that helps the user run a digital device. Types of systems
software include the operating system and utility programs. The operating system is the
part of the systems software we are most familiar with and it is the most important piece of
systems software. One of the main tasks carried out by the operating system is providing
a user interface between the user and the computer. It allows the user to interact with the
computer hardware and other programs or applications stored on the computer. Without
the operating system, the computer hardware would be useless.
Applications software is software that is used to carry out user-related tasks, such
as creating a presentation or a party invitation or making a video call. Examples of
applications software include apps on your mobile phone, word-processing applications,
image-editing applications, internet web browsers and spreadsheet applications.
All of the digital devices we use in our homes require both systems software and
applications software to operate correctly.

Some of devices you use in everyday life


now require applications software that can
include artificial intelligence (AI) to allow you
to interact with them fully. For example, when
asking ‘What will the weather be like?’ to a digital
assistant, the microphone records what you are
saying and sends it to a cloud-based service that
is able to extract key words from what you have
asked in order to interpret your request. In this
instance, an audio response detailing today’s
weather forecast is sent back to the device and
played through its speaker so that you hear
the forecast.

KEYWORDS
software: aspects of a computing device that you cannot touch; the
programs that run on a device
systems software: software that runs the hardware and software, i.e. the
operating system
operating system: the systems software that manages hardware and
software on a device
user interface: the way that users and computer systems communicate

153
369320_C5_Che_LS Comp7_SB_150-181.indd Page 158 23/08/22 11:54 AM user /102/HO02571/work/indd

DRAFT CONTENT - NOT YET APPROVED

CAMBRIDGE LOWER SECONDARY COMPUTING 7

AI in industry
Learn
AI helps in many areas of industry.
Large amounts of data are collected about individuals daily. For example, data is collected
from terms you have used to search the internet, images you have viewed or downloaded,
films you have watched and even the URLs of websites you have visited. This data is used
by AI systems to build a data model to represent you: your preferences (likes and dislikes).
AI systems then use this data to carry out a range of tasks automatically without the need
for a human telling them to, for example
by automatically targeting you with further
suggestions for websites, films and products
Think about the various ways in
to buy. which cookies collect data about users’
AI relates to the processing of data to make online activities, the products they are
a decision, and also to the control of physical interested in or even local events that might
machines to manufacture a new product. be of interest to them.
When computer systems operate in this way AI is able to analyse this data at
we say they are automated. Use of data and high speed and select appropriate
systems like this can apply to a wide range advertisements for users. Advertising
of industries and applications; some of these cookies collect information about
are shown in the table below: users from their digital devices.

AI in industry How AI is used


Businesses Sales predictions: AI applications can help businesses make predictions. The data about past
ordering sales is stored in large databases and analysed quickly using AI to make predictions about future
products sales. This means that they order the correct level of goods and there is no waste.
Business and Fraud detection: By analysing consumer purchases over time, AI applications can quickly pick up
finance unusual activity on a customer’s bank card and send a text to the user to alert them. Often this
task is automated.
Bookings and Chatbots: Chatbots are AI systems that users can interact with in a conversation-like way. One
online enquiries can ask questions and the other will provide answers. These are often used to interact with users
online when they first make enquiries about something such as a holiday booking. The user types
a question into the chatbot. The chatbot then decides whether the user needs to speak to a
human assistant, if it cannot answer the question.
Manufacturing Many products are now designed using software applications. The applications then use product
input to design a computer program to manage the manufacturing process of a product without
human intervention, for example adding the contents to canned food products and sealing the
tin, or putting together the parts to make a new product such as a car or a toy.
Advertising AI applications can collect data about users from their personal digital devices. This is done
using text files called cookies. Using this data, advanced AI applications can automatically
target advertisements for each user the next time they open up a social-media application. For
example, how many times have you heard an adult at home say that they were only just talking
about something or had just searched for an item online when all of a sudden they start receiving
electronic advertisements for that same item?
Healthcare AI applications are often used for diagnosing illness, research and development of medicines,
and remotely treating patients. AI is changing the medical profession. AI applications can collect
data about a patient’s heart rate, using, for example, smart watches, and use this data to alert
doctors to problems with a patient’s health.

158
369320_C5_Che_LS Comp7_SB_150-181.indd Page 159 23/08/22 11:54 AM user /102/HO02571/work/indd

DRAFT CONTENT - NOT YET APPROVED

Unit 7.5 Living with AI: Digital data

The use of AI applications offers many pros to numerous areas of our lives and industry
today. However, there are also some cons, for example:

AI pros AI cons
l Reduction in errors: for example, using AI in l Expensive to develop: AI applications software is
weather forecasting has reduced errors in complex and expensive to produce, as are any devices
forecasting and increased accuracy. linked to the AI application (they can also be costly to
l Available 24 hours a day: for example, AI can maintain).
be used automatically to monitor standards of l Unemployment: AI systems can perform tasks more
production in manufacturing industries without any quickly than humans, and they can work 24 hours
breaks. a day and do not make mistakes. Some people are
l Increased speed of decision-making: for example, concerned that these advantages of AI systems will
self-driven cars use AI to monitor and react faster lead to job losses.
to changes in the environment around them than a l No emotional connection: many people are worried
human driver can. that using AI to make decisions means that decisions
l Helps with research and development in almost all are made on facts only and do not take into account
areas of life: for example, AI can be used to predict people's feelings. For example, AI systems will make
patterns in health trends and allow for decisions to recommendations regarding treatment hospital
be made about the location of health centres and patients should or should not get without considering
hospitals to meet the changing needs of society. the patients’ personal circumstances.

KEYWORDS
automated: when task is carried out automatically, without human
intervention, and based on input and the processing of a set of program
instructions
fraud: deceiving someone for financial or personal gain
consumer: an individual purchasing a product or service for their own
use
chatbot: software that simulates a human-like conversation via text
messages
manufacturing: the process of creating something
text file: a file that contains data in text format only, with no additional
images or formatting
cookie: a text file that holds small pieces of data about a user
smart watch: a wearable computer in the form of a watch
trend: a pattern that shows behaviour or data moving in a general
direction

159
369337_U7.5_CLS_Computing7 TG_167-201.indd Page 167 25/08/22 10:30 AM F-0250 /102/HO02593/work/indd

DRAFT CONTENT - NOT YET APPROVED

Stage 7 Teacher's Guide

7.5 Living with AI: Digital data

Learning objectives overview


These learning objectives and associated codes are reproduced from the Cambridge Lower
Secondary Computing Curriculum framework (0860) from 2021. This Cambridge International
copyright material is reproduced under licence and remains the intellectual property of Cambridge
Assessment International Education.

Curriculum
framework Student’s Teacher’s Guide
Learning objective code Book pages pages Online resources
Computational Thinking
Follow and understand 7CT.03 176–177 191, 192, 193, 201 7.5.6 Worksheet 7
the logic of AND, OR,
Using Logic Gates.xlsx
NOT.
Managing Data
Know that there are a 7MD.01 177 192 Using Logic Gates.xlsx
range of systems that
can be used to model
real-life systems, such as
simulators.
Computer Systems
Evaluate the design of 7CS.01 164, 180 179, 180, 182, 184 7.5 Presentation slide 2
a computer device or
7.5.3 Visual 2
system.
7.5.3 Worksheet 3
7.5.3 Worksheet 4
Understand the difference 7CS.02 154, 179–180 173, 174 Software Knowledge
between application Organiser.docx
software and system
7.5.1 Visual 1
software.
Describe how an 7CS.03 168, 170, 180 184, 185, 186 Bitmap Practice.docx
analogue image is
Your Bitmap.docx
digitised.
7.5.4 Worksheet 5
Computer Systems
Understand that a binary 7CS.04 168, 172, 180 184, 186, 188, 189 Bitmap Practice.docx
number can represent
Your Bitmap.docx
different data, such as
numbers, characters, 7.5.4 Worksheet 5
images, sound.
ASCII Conversion
Chart.docx
7.5.5 Worksheet 6
7.5 Presentation

167
369337_U7.5_CLS_Computing7 TG_167-201.indd Page 168 27/08/22 9:57 AM user /102/HO02593/work/indd

DRAFT CONTENT - NOT YET APPROVED

CAMBRIDGE LOWER SECONDARY COMPUTING 7 TEACHER’S GUIDE

Curriculum
framework Student’s Teacher’s Guide
Learning objective code Book pages pages Online resources
Know that a computer is 7CS.05 173, 178 192, 193, 196 7.5.6 Worksheet 7
made up of logic gates
Using Logic Gates.xlsx
that are represented by
Boolean logic.
Understand the role of 7CS.06 176–177, 180 192, 193 7.5.6 Worksheet 7
logic gates in a circuit,
Using Logic Gates.xlsx
including AND, OR and
NOT. 7.5 Presentation
Know that Artificial 7CS.07 163, 164, 172, 172, 178, 179, 180, 7.5.2 Worksheet 2
Intelligence (AI) allows 180 181, 182, 188
AI Around Us.pptx
a computer to take
information from its 7.5 Presentation slide 1
surroundings to produce
7.5 Presentation slide 2
an output based upon
how it is able to process 7.5.8 Worksheet 8
that information.
Explain the use of 7CS.08 160, 177 178, 196 7.5.2 Worksheet 2
automation in at least
AI Around Us.pptx
two industries, such as
health, manufacture or
advertising.
Explain a range of 7CS.09 157, 160, 177 172, 174, 176, 178, 7.5.2 Worksheet 2
applications of AI, 180, 182, 184, 196,
AI Around Us.pptx
including in image 197
recognition and in 7.5.1 Visual 1
computer games.
7.5.3 Visual 2
7.5.3 Worksheet 3
7.5.3 Worksheet 4
7.5.8 Worksheet 8

168
369337_U7.5_CLS_Computing7 TG_167-201.indd Page 169 25/08/22 10:30 AM F-0250 /102/HO02593/work/indd

DRAFT CONTENT - NOT YET APPROVED

7.5 Living with AI: Digital data

Background information
This unit introduces students to the concept of applications software and systems software before
presenting the idea of AI and automation and their application in a range of industry areas.
Students will learn that AI devices collect, use and store data in a variety of formats, including
images, sound, text and numbers. In this unit, students are encouraged to look beyond the use of AI
with robotic technology and to consider how it has been integrated into the computing systems that
we interact with on a daily basis.
From Stage 6, students may already be familiar with the concept of robotics and autonomous
processing and some applications of robotics in industry. They may also be familiar with some of the
architectural elements associated with computer hardware in addition to understanding that there
are a range of approaches to programming solutions to allow users to implement hardware to solve
problems. In examining how computing systems, and therefore AI systems, manage data in various
formats, students will learn how sound, images and text are stored in digital format. In addition,
they will examine how digital images are used to support image recognition in AI applications and
computer gaming applications. They will consider how AI systems are used in a range of industries,
including health, manufacturing and advertising before being given the opportunity to design an AI
device that they could use to help them to complete a daily task.
This unit introduces students to the idea that computing systems use logic gates to support decision-
making and students will learn about three key logic gates used in the design of logic circuits.
In preparation for this unit, students should have access Microsoft Excel, Microsoft Word and the
internet for research.

Prior knowledge
Students may already be familiar, from Stage 6, with the concept of analogue data and that it must
be digitised (converted into a numerical format) before it can be processed by a computer. They
may also have some understanding of the autonomous nature of robotic technology. Where this is
not the case, support may be required to ensure that these students are provided with additional
guidance when completing the tasks in this unit.
Before starting this unit, students should already be able to:
l identify the difference between analogue and digital data
l explain why analogue data needs to be digitised to be processed by a digital device
l explain some ways in which robots can operate without human interaction
l identify some of the advantages and disadvantages of using robots to complete a range of tasks.

Cambridge learner attributes


Cambridge students are encouraged to display these attributes in every lesson. The tasks in the
Student’s Book are designed to support these attributes, e.g. through partner and group work,
through peer evaluation and through independently thinking through a problem even if the
outcome is not as expected.

169
369337_U7.5_CLS_Computing7 TG_167-201.indd Page 170 25/08/22 10:30 AM F-0250 /102/HO02593/work/indd

DRAFT CONTENT - NOT YET APPROVED

CAMBRIDGE LOWER SECONDARY COMPUTING 7 TEACHER’S GUIDE

Some specific examples for this unit are given below:

Responsible in the completion of evaluation students consider the input devices used in a range
exercises; where students evaluate each other’s of AI applications; in their ability to communicate
designs for AI systems to aid the completion of a their ideas in front of peers.
personal task and in the evaluation of each other’s
Engaged during interactions with digital
AI-based learning applications in the ‘Final project’;
spreadsheet models to aid students’ understanding
students are expected to be responsible in their
of logic gate operation and the completion of
treatment of others when providing feedback.
design tasks; throughout the various task types
Innovative in their completion of ‘Practise’ tasks, across the unit, such as table completion and
where students design AI devices that can help discussion tasks where consideration is given to
them complete repetitive or mundane tasks; AI applications in real life.
through the ‘Final project’, where students
Reflective during evaluation tasks, e.g. evaluation
consider appropriate use of logic gates to manage
of AI device designs for personal use and the
decision-making in solving a realistic problem.
AI-based learning applications in the ‘Final project’;
Confident during discussion exercises, e.g. students frequently review the knowledge and
students examine the difference between skills they have developed in each lesson.
applications software and systems software;

170
XXXXXX_Marketing Sample.indd Page 2 14/09/22 9:58 AM user /102/HO02637/work/indd/Marketing%20Sample

DRAFT CONTENT - NOT YET APPROVED

Contents
Stage 8 Learner's Book

Introduction

8.1 Network structure and security

8.2 It’s all in the planning: Pseudocode and algorithms

8.3 Let’s talk technology: What’s going on inside

8.4 Testing conditions: Developing games

8.5 Data collection and validation

8.6 Iterating through a solution: Software design and


development

Glossary

Index

Acknowledgements
369795_8.6_LSCompSB8_163-194.indd Page 163 8/27/22 6:30 PM f-0236-new /102/HO02637/work/indd

DRAFT CONTENT - NOT YET APPROVED


Iterating through a solution:
DRAFT CONTENT - NOT YET APPROVED

Unit Software design and


8.6 development
Get started!
Have you considered how to approach
a project or programming task so that it
flows from start to finish? Discuss with
your partner:
l How do you normally start a new
programming project?
l What planning do you do?
l When do you check for errors in your
program?
Working on a project requires you to
develop the initial idea through to the planning and development of the final program.
This is a cycle of development that you will look at in detail throughout this unit.
You will look at how to work through a project from start to finish in an effective way. You
will develop your use of pseudocode to plan your algorithm and your programming skills
to create a quiz-based Python program.

Learning outcomes
In this unit, you will learn to:
l develop a Python program using an iterative process
l identify and explain the key characteristics of pseudocode
l follow and understand an algorithm presented as pseudocode
l explain and use the rules AND, OR and NOT to create logic within an algorithm
l follow flowcharts and pseudocode algorithms that use conditional statements
l predict the outcome of algorithms that use pseudocode
l create a Python program that uses conditional statements
l create a program in Python that uses a range of different data types
l develop a Python program that uses rules involving AND, OR and NOT
l decompose a problem into smaller sub-problems to make it easier to solve
l explain what a program library is used for in Python and give an example of how
libraries are used
l identify and use library functions in Python programs
l identify and describe the data types in a Python program
l develop and apply a test plan to ensure a Python program or algorithm works
correctly.

163
369795_8.6_LSCompSB8_163-194.indd Page 164 8/27/22 6:30 PM f-0236-new /102/HO02637/work/indd

DRAFT CONTENT - NOT YET APPROVED

Cambridge Lower Secondary Computing 8

Warm up
In pairs, think about the stages you work though when creating any
product. What is included in each of the stages? How do you know
when you are ready to move on to the next stage?
Discuss a project you have been involved with, for example writing
a story, creating a working program or designing a poster. Consider
how you worked through from start to finish:
l How did you start the project?
l What was involved in the planning for the project?
l How did you create the final product?
l How did you know whether the final product was a success? KEYWORDS
l How did you develop the product from the initial idea? evolving: changing
and improving
A good product will evolve as you work through its
iterative process:
development, but does not lose sight of the initial idea. How can how a project
you ensure that you keep the requirements of the product in develops throughout
mind while you develop the solution? stages

SCENARIO
Quiz questions are integrated into a wide range of academic and social activities. You may have
completed quiz questions in school, in a magazine, through a website or via social media. All
quiz questions have correct and incorrect answers.
You will also have undertaken a wide range of projects throughout your education that require
you to plan before you create. Following a clear process from start to finish is an essential tool to
a product’s success.
When creating a quiz program, you can develop program code in sections through an iterative
process to ensure that the final program is the
best it can be and free from errors. An iterative
process is about continuously developing the
idea as you work through both the algorithm
and programming to develop it further.
Your challenge is to create a program for your
local community to inform the user whether
or not a specific item can be recycled. You will
use a quiz-style program to ask three questions;
once the user has answered all three questions,
your program will tell them whether the item
can be recycled. You will use an iterative process
throughout the planning, development, testing
and evaluation.

164
369795_8.6_LSCompSB8_163-194.indd Page 165 8/27/22 6:30 PM f-0236-new /102/HO02637/work/indd

DRAFT CONTENT - NOT YET APPROVED

Unit 8.6 Iterating through a solution: Software design and development

Do you remember?
Before starting this unit, you should be able to:
✔ follow an algorithm presented in pseudocode
✔ follow pseudocode algorithms that use conditional statements
✔ discuss how to develop a program in Python
✔ use a pseudocode algorithm to develop a program in Python
✔ develop programs in Python that use conditional statements.

In this unit, you will use the Python programming language.

Python’s Integrated Development and Learning Environment For more information


(IDLE) provides features for creating, editing and running about IDLE, see the
programs. Before using Python, you will need to install IDLE ‘Making choices’
on your own personal device: section in Unit 8.4.
1 Go to www.python.org/downloads
2 Select Download Python.
3 Once downloaded, double-click on the file to open it and then choose Install Now.
4 Once IDLE has installed, it should appear in your Start menu.

What is an iteration?
Learn
You have looked in previous units at a range of projects and have developed them from
plan through to program completion. How you approach and work through a project
is important. The development needs to follow a clear process to allow you to make
improvements and detect and fix errors. The whole process of development allows for the
final delivered program to meet the initial requirements of the project.
Waterfall model
One way to work through a project is called the waterfall model.

Plan

Design

Develop

Test

Review and evaluate

165
369795_8.6_LSCompSB8_163-194.indd Page 166 8/27/22 6:30 PM f-0236-new /102/HO02637/work/indd

DRAFT CONTENT - NOT YET APPROVED

Cambridge Lower Secondary Computing 8

In a waterfall, water falls from the top down to the bottom. A waterfall model works
in the same way; the project starts at the top and moves down each individual step in
turn.
When a waterfall model is used, the client delivers the project requirements and then
sees the final product only at the end of the process. They have little involvement
through the process and so more time is spent on the planning stage before moving to
development.
The waterfall model usually has the following stages:
l The planning stage involves gathering and understanding all the client’s requirements.
The project is broken down into its sub-tasks in a process known as decomposition,
and the requirements for each of these sub-tasks are written down, along with
timelines and success criteria.
l The design stage differs depending on the product being created. If an interface
is required, this would usually be sketched out ready to be used when the creating
starts. If program code is required, this is where the algorithm would be planned
and represented as either a flowchart or pseudocode. The algorithm would be
tested and there would be input from others to gain feedback and ideas for
improvement.
l The development stage is when the product is created. If the product requires
programming, this is the stage when it is written and developed.
l Through the testing stage, the product is checked and more feedback gathered. If
programming has been used, then this is checked for errors and a structured test plan
with a range of test data is used to help identify and fix any errors. The client and other
users are involved in this stage to give feedback.
l Reviewing is a key area as, through the testing and feedback, the product is evaluated
and improved before the final solution is launched. Once a product has been released,
further improvements may be made.
Iterative process
Another way to approach a project is to follow an iterative process. This involves
splitting the project into smaller sections, which are looked at in order of priority.
There is reduced planning as the client is involved at the completion of each stage to
help refine and develop the project, and ensure that it stays on track and meets the
requirements.

lua lua lua


eva te eva te eva te
d d d
Review an

Review an
Review an
Te s t

Te s t

Te s t

1 2 3
op

op

op

el el el
Plan Design Dev Plan Design Dev Plan Design Dev

166
369795_8.6_LSCompSB8_163-194.indd Page 167 8/27/22 6:30 PM f-0236-new /102/HO02637/work/indd

DRAFT CONTENT - NOT YET APPROVED

Unit 8.6 Iterating through a solution: Software design and development

Looking at the figure above, you can see that the iterative process is made up of a number
of cycles. Iteration means ‘repetition’. The different stages of the project are developed in
repeated sections.
The iterative process is also known as an agile approach, and each section is called a
sprint. It allows the project to be developed and refined throughout the process to ensure
that the final project is released on time and meets the initial requirements.
The iterative model usually has the following stages:
l The project has an initial plan that is put together from the requirements the client
provides.
l The next step is to move into the design stage. Depending on the project, this could be
a flowchart or pseudocode to plan the algorithm required.
l The development stage includes writing the program code to create the program.
l The test stage requires a test plan to check the functionality of the program,
identifying errors that are fixed to ensure that it works as expected and meets the
requirements.
l The review and evaluation stage is when other users check the program code and
provide feedback, and the client is also brought in to check they are happy with this
part of the product before moving on.
Once a section is complete, the project moves to the next section to start the cycle all
over again.
Here is a comparison of the two project processes:

Waterfall process Iterative process


l More time is spent on the planning stage before l The client is involved in each stage to help refine
moving to development. and develop the product.
l The client delivers the project details and then sees l The process develops as the project does.
the final product at the end. l The project is split into smaller sections and the
l The project starts and moves down to the next step sections are looked at in order of priority.
as each individual step is completed.

KEYWORDS
program: the instructions that tell a computer algorithm: step-by-step instructions to solve a
system how to complete a task particular problem
initial requirements: the idea and starting plan for flowchart: a visual representation of an algorithm
a project pseudocode: a textual representation of an
client: the person a product is being developed for algorithm
decomposition: the process of breaking a problem test plan: a document that details the tests to
down into smaller sub-problems to make it easier be carried out when a program is complete and
to solve whether or not they are successful
interface: how a user interacts with a product iteration/iterate: repetition/to repeat

167
369801_8.6_Camb_LS_CS7_TG_BP_194-231.indd Page 194 16/08/22 5:23 PM user /145/HO02668/work/indd

DRAFT CONTENT - NOT YET APPROVED


Stage 8 Teacher's Guide

Iterating through a solution:


8.6 Software design and development

Learning objectives overview


These learning objectives and associated codes are reproduced from the Cambridge Lower
Secondary Computing Curriculum framework (0860) from 2021. This Cambridge International
copyright material is reproduced under licence and remains the intellectual property of Cambridge
Assessment International Education.
Curriculum Student’s Teacher’s
Learning objective framework code Book pages Guide pages Online resources
Computational thinking
Follow and understand 8CT.01 8.6.3 Worksheet 6
algorithms that are presented as
8.6.4 Worksheet 8
pseudocode.
8.6 Knowledge test
Follow flowcharts and 8CT.02 8.6.3 Worksheet 6
pseudocode algorithms that use
8.6.4 Worksheet 8
conditional statements.
Identify the important 8CT.03 8.6.3 Worksheet 7
characteristics of pseudocode,
8.6.5 Worksheet 10
including that it should be short,
clear and precise and should have 8.6 Knowledge test
the start and end clearly shown.
Understand and use rules using 8CT.06 8.6.6 Worksheet 13
AND, OR and NOT to create logic
within algorithms.
Predict the outcome of algorithms 8CT.07 8.6.4 Worksheet 8
and test that they meet those
outcomes.
Know how to decompose 8CT.08 8.6 Presentation
problems into their sub-problems.
8.6.1 Worksheet 1
8.6.1 Worksheet 2
8.6.2 Worksheet 3
8.6.2 Worksheet 4
8.6.2 Visual 1
Programming
Outline the purpose of program 8P.01 8.6.8 Worksheet 17
libraries.
Identify and describe data types 8P.02 8.6.4 Worksheet 8
in text-based programs, including
8.6.4 Worksheet 9
Integer, Real and Boolean.
8.6.5 Worksheet 10
8.6 Knowledge test

194
369801_8.6_Camb_LS_CS7_TG_BP_194-231.indd Page 195 16/08/22 5:23 PM user /145/HO02668/work/indd

DRAFT CONTENT - NOT YET APPROVED

8.6 Iterating through a solution: Software design and development

Learning objective 8.6


Curriculum
framework code
Student’s
Book pages
Programming
Teacher’s
Guide pages Online resources

Identify and know how to use 8P.03 8.6.8 Worksheet 17


library functions in text-based
programs.
Know how to develop text-based 8P.04 8.6.7 Worksheet 16
programs with conditional
8.6 Knowledge test
(selection) statements.
Know how to develop text-based 8P.05 8.6.5 Worksheet 10
programs using data types,
including Integer, Real, String and
Boolean.
Know how to develop text- 8P.06 8.6.5 Worksheet 10
based programs which use rules
8.6.7 Worksheet 16
involving AND, OR and NOT.
8.6 Knowledge test
Use an iterative process to 8P.07 8.6.7 Worksheet 15
develop programs.
Know how to develop and apply 8P.08 8.6.6 Worksheet 12
test plans.
8.6.6 Worksheet 13
8.6.6 Worksheet 14
Explain the need for using a range 8P.09 8.6.6 Worksheet 12
of test data.
8.6.6 Worksheet 13
8.6.6 Worksheet 14
8.6.7 Worksheet 16
Know how to test algorithms using 8P.10 8.6.6 Worksheet 14
suitable data.

Background information
Students will already be familiar with some Python syntax from Stage 7 and Unit 8.4. This unit
continues to develop their knowledge, skills and understanding of programming in Python.
Students continue to expand their programming knowledge and skills to develop program code to
meet a program requirement. Students also investigate how different development process models
can impact the way a programmer develops the program code for the final product.
In preparation for this unit, students should have access to a text-based programming application;
the content of this unit has been developed using Python.

Prior knowledge
Students should already be familiar with basic programming in Python from Stage 7 and Unit 8.4.
Where this is not the case, support and additional guidance may be required when navigating the
key features of the applications used in this unit.

195
369801_8.6_Camb_LS_CS7_TG_BP_194-231.indd Page 196 16/08/22 5:23 PM user /145/HO02668/work/indd

DRAFT CONTENT - NOT YET APPROVED

CAMBRIDGE LOWER SECONDARY COMPUTING 8 TEACHER’S GUIDE

Prior to starting this unit, students should already be able to:


● follow an algorithm presented pseudocode
● follow pseudocode algorithms that use conditional statements
● discuss how to develop a program in Python
● use a pseudocode algorithm to develop a program in Python
● develop programs in Python that use conditional statements.

Cambridge learner attributes


Cambridge students are encouraged to display these attributes in every lesson. The tasks in the
Student’s Book are designed to support these attributes, e.g. through partner and group work;
through peer evaluation; and through independently thinking through a problem even if the
outcome is not as expected.
Some specific examples for this unit are given below:

Responsible through discussion; where students Python, developing their confidence in writing
explore the waterfall model and the iterative program code in Python. In doing so, they explore
process for developing a product, students show how different Python syntax can be applied in a
that they can work collaboratively with others in a confident and expressive way to solve problems
respectful and responsible manner. They give other presented to them in the ‘Scenario’. Students can
students the opportunity to express their opinion confidently develop a program from pseudocode to
during discussion. In the development of programs Python program code.
using Python, students can develop programs in
Engaged in tasks across the unit; students develop
a responsible manner, following instructions and
new skills related to the development of text-
listening to the views of others using computers
based programming in Python and pseudocode.
carefully. Through the ‘Final project’, students
The use of a range of programs ensures
can develop a quiz-based program to determine
engagement and enquiry in the practical elements
whether an item can or cannot be recycled,
of this unit of work.
developing responsibility for the environment.
Reflective in the ‘Practise’ tasks; students have
Innovative in the ‘Final project’; students can
regular opportunities to discuss with a partner or
apply the skills developed in the use of Python to
as a class what they have learned; predict what the
produce innovative solutions to the problems in the
pseudocode or programs show; or share thoughts
‘Scenario’. Students develop their quiz in Python
on how to develop a program further. Across
and test iteratively by developing and applying
the unit, students evaluate their work, e.g. the
a test plan. They can develop their own solution
impact of using an iterative process for program
in Python for a quiz-based program to determine
development, and developing and applying test
whether an item can or cannot be recycled.
plans. Students use their tests and feedback to
Confident in the ‘Practise’ tasks and ‘Final improve their work.
project’; students can follow pseudocode and

196
Endorsement indicates that a resource has passed Cambridge International’s rigorous quality-assurance
process and is suitable to support the delivery of a Cambridge International curriculum framework. However,
endorsed resources are not the only suitable materials available to support teaching and learning, and are not
essential to be used to achieve the qualification. Resource lists found on the Cambridge International website
will include this resource and other endorsed resources.
Any example answers to questions taken from past question papers, practice questions, accompanying marks
and mark schemes included in this resource have been written by the authors and are for guidance only.
They do not replicate examination papers. In examinations the way marks are awarded may be different.
Any references to assessment and/or assessment preparation are the publisher’s interpretation of the
curriculum framework requirements. Examiners will not use endorsed resources as a source of material for any
assessment set by Cambridge International.
While the publishers have made every attempt to ensure that advice on the qualification and its assessment is
accurate, the official curriculum framework, specimen assessment materials and any associated assessment
guidance materials produced by the awarding body are the only authoritative source of information and should
always be referred to for definitive guidance. Cambridge International recommends that teachers consider using
a range of teaching and learning resources based on their own professional judgement of their students’ needs.
Cambridge International has not paid for the production of this resource, nor does Cambridge International
receive any royalties from its sale. For more information about the endorsement process, please visit
www.cambridgeinternational.org/endorsed-resources
Cambridge International copyright material in this publication is reproduced under licence and remains the
intellectual property of Cambridge Assessment International Education.
Third-party websites and resources referred to in this publication have not been endorsed by Cambridge
Assessment International Education.
Although every effort has been made to ensure that website addresses are correct at time of going to press,
Hodder Education cannot be held responsible for the content of any website mentioned in this book. It is
sometimes possible to find a relocated web page by typing in the address of the home page for a website in
the URL window of your browser.
Hachette UK’s policy is to use papers that are natural, renewable and recyclable products and made from
wood grown in well-managed forests and other controlled sources. The logging and manufacturing processes
are expected to conform to the environmental regulations of the country of origin.
Orders: please contact Hachette UK Distribution, Hely Hutchinson Centre, Milton Road, Didcot, Oxfordshire,
OX11 7HH. Telephone: +44 (0)1235 827827. Email education@hachette.co.uk Lines are open from 9 a.m. to
5 p.m., Monday to Friday. You can also order through our website: www.hoddereducation.com
© Margaret Debbadi and Pam Jones 2022
First published in 2022 by
Hodder Education,
An Hachette UK Company
Carmelite House
50 Victoria Embankment
London EC4Y 0DZ
www.hoddereducation.com
All rights reserved. Apart from any use permitted under UK copyright law, no part of this publication may be
reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and
recording, or held within any information storage and retrieval system, without permission in writing from the
publisher or under licence from the Copyright Licensing Agency Limited. Further details of such licences (for
reprographic reproduction) may be obtained from the Copyright Licensing Agency Limited, www.cla.co.uk
Photo credits:
Cover images l-r © AndSus - stock.adobe.com, © AndSus - stock.adobe.com, © ZinetroN - stock.adobe.com
p.150 © Andrey Popov/stock.adobe.com; p.151 © phonlamaiphoto/stock.adobe.com; p.152 © NicoElNino/
stock.adobe.com; p.153 © bht2000/stock.adobe.com; p.163 © Julia Lazebnaya/Shutterstock.com; p.164 ©
Viktoria Kurpas/stock.adobe.com

369795_FM_LSCompSB8_001-007.indd 2 14/09/22 10:15 AM


Boost eBooks are interactive, accessible
Boost and flexible. They use the latest research
eBooks and technology to provide the very best
experience for students and teachers.

Personalise Revise Listen Switch Download

Easily navigate Select key facts Many of our Seamlessly move Access the eBook
the eBook with and definitions eBooks use text- between the offline on any
search, zoom and in the text and to-speech to printed view for device – in school,
an image gallery. save them as flash make the content front-of-class at home or on
Make it your cards for revision. more accessible teaching and the the move – with
own with notes, to students interactive view the Boost eBooks
bookmarks and and improve for independent app (available on
highlights comprehension study. Android and iOS).
and pronunciation.

The Cambridge Lower Secondary


Teacher’s Guides Computing Teacher’s Guides
with Boost include a print handbook and a
subscription to Boost, where
subscription you will find a range of online
resources to support your teaching.

Confidently deliver the new curriculum framework: Expert author guidance


on the learning models and approach plus an interactive Course Plan.

Develop key concepts and skills: Suggested activities, quizzes and guidance on
assessment, as well as ideas for supporting and extending students working at different levels.

Enrich learning: Audio versions of the texts to help aid understanding, pronunciation
and critical appreciation.

To request your free 30-day trial, visit


hoddereducation.com/cambridge-lowersec-computing

Cambridge Lower Secondary Computing 4pp A4_3.0.indd 3 11/05/2022 12:43


What’s publishing and when:

Title ISBN Pub date Price

Student’s Book 7 ENDORSED 9781398369320 Sept 2022 £22

Student’s Book 8 9781398369795 Dec 2022 £22

Student’s Book 9 9781398369825 Apr 2023 £22

Student’s Book 7 Boost eBook 9781398371149 Sept 2022 £14.50 for 1-year access

Student’s Book 8 Boost eBook 9781398371156 Dec 2022 £14.50 for 1-year access

Student’s Book 9 Boost eBook 9781398371187 Apr 2023 £14.50 for 1-year access

Teacher’s Guide 7 with Boost subscription 9781398369337 Sept 2022 £135 excl.VAT

Teacher’s Guide 8 with Boost subscription 9781398369801 Dec 2022 £135 excl.VAT

Teacher’s Guide 9 with Boost subscription 9781398369818 Apr 2023 £135 excl.VAT

To explore the series visit


hoddereducation.com/cambridge-lowersec-computing

What’s next

To place an order, get in touch via international.team@hoddereducation.com

To request eInspection copies, visit


www.hoddereducation.com/cambridge-lowersec-computing

Receive the latest news, free resources and sample material when you sign up
for eUpdates at www.hoddereducation.com/eUpdates

ISBN: 9781398385276

Cambridge Lower Secondary Computing 4pp A4_3.0.indd 4 11/05/2022 12:43

You might also like