0% found this document useful (0 votes)
458 views201 pages

Digital Technology Textbook GR 9 2022

The document provides an overview of various technology concepts, including systems technology, cloud computing, and search engines. It covers the differences between system software and application software, the functions of utility programs, and the importance of cloud computing in everyday life. Additionally, it explains how search engines work and offers tips for effective online searching.

Uploaded by

mantamboamahle18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
458 views201 pages

Digital Technology Textbook GR 9 2022

The document provides an overview of various technology concepts, including systems technology, cloud computing, and search engines. It covers the differences between system software and application software, the functions of utility programs, and the importance of cloud computing in everyday life. Additionally, it explains how search engines work and offers tips for effective online searching.

Uploaded by

mantamboamahle18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 201

Table of Contents

Table of Contents ................................................................................................................................. 1


CHAPTER 1: SYSTEMS TECHNOLOGY .............................................................................................................. 2
CHAPTER 2: KEYBOARDING PROFICIENCY ..................................................................................................... 23
CHAPTER 3: WORD PROCESSING ................................................................................................................ 30
CHAPTER 4 COMPUTATIONAL THINKING ...................................................................................................... 49
CHAPTER 5: DIGITAL CITIZENSHIP ............................................................................................................... 76
CHAPTER 6: SPREADSHEETS ..................................................................................................................... 108
CHAPTER 7: CODING .............................................................................................................................. 134

1
CHAPTER 1: SYSTEMS TECHNOLOGY
Chapter Overview

Unit 1.1 Term 1 System software


Overview of Systems Application software
Technologies Utility software

Unit 1.2 Term 1 ICTs in everyday life


Chapter 2 Overview of cloud
Online banking
Systems Technologies computing and search
engines Online shopping

Unit 1.3 Term 1 ICTs in everyday life


Overview of computers Online banking
in everyday life Online shopping

Prior Knowledge

Gr 8 Systems Technology knowledge


required for this chapter

At the end of this chapter you should be able to:

• Explain the difference between system software and application software (such as MS Windows vs
MS Office suite)

• Provide the definition and function of application software (Microsoft Office Suite, e.g. Word
processing, Spreadsheets)

• Explain what utility software is (e.g. Anti-virus)

• Demonstrate the use of Cloud computing, e.g. OneDrive / Dropbox / Google Drive, Google Docs /
Google Sheets

• Demonstrate an understanding of a Search engine (e.g. Google)

• Discuss the use of ICTs in real life/ everyday life (such as shopping, banking and education)

• Explain how their education can be supported by online/computer resources

• Explain the features/characteristics of online banking and shopping

2
UNIT 1.1: OVERVIEW OF SYSTEMS TECHNOLOGIES
This unit provides an overview of systems technologies and the basic concepts thereof

Purpose of the unit


At the end of this unit the learners should be able to:

• Explain the difference between system software and application software (Windows vs MS Office
suite)

• Definition and function of application software (Microsoft Office Suite, e.g. Word processing,
Spreadsheets)

• Explain what utility software is (anti-virus software, file compression software, disk maintenance, pop
up blockers and file management software)

Introduction
The main parts of a computer system are hardware and software.
• Hardware is the physical parts of the computer system
• Software is the programs that run on computer hardware parts.
There are two different types of software: system software and applications software
System software is a type of computer program that is designed to run a computer’s hardware and to
provide a platform for other application software such as a game or a word processing program.

System Software
A computing device such as a computer/smartphone/tablet, needs operating software such as
Windows/Android/iOS. The operating software is a type of system software.
System software is a set of software designed to control and operate the hardware components of the
computer and allow the application programmes to operate. This serves as a platform for application
software to be able to run.
The general role of the operating system is to manage and control all activities taking place in the
computer.

3
Main functions of an operating system:

• manage the computer's resources, such as the central processing unit, memory, disk drives, and
printers,
• establish a user interface (GUI)
• execute and provide services for applications software

Picture below explains what Operating Software is:

Types of operating systems for different type of computers:


Standalone Network Mobile
Windows Windows Server Android
Mac OS X Mac OS X Server iOS
Chrome OS Red Hat Linux
Linux (Ubuntu, Fedora) UNIX
Cisco IOS

Standalone Operating Systems (Examples)


Windows – The operating system from the company called Microsoft, it runs on many desktop computers.
It has many versions which started with Windows 3.0 and we are currently at windows 11
Mac OS X – The operating system from the company called Apple. It runs on customised Apple computers
only
Chrome OS – is a Linux-based operating system designed by Google.
Linux (Ubuntu, Fedora) – This operating system is not owned by anyone and anyone is free to open and
modify it. Versions of this type of operating system are Fedora, Ubuntu and many more.

4
Network Operating Systems (Examples)
Windows Server – An operating system for managing networks from a company called Microsoft
Mac OS X Server – An operating system for managing networks developed by Apple
Red Hat Linux – A Linux based operating system for managing large networks distributed and maintained
by a company called Red Hat
UNIX – An operating system for multi users developed by AT&T and Bell
Cisco IOS - a family of network operating systems used on most Cisco Systems routers and current Cisco
network switches

Mobile Operating Systems (Examples)


Android - is a mobile operating system based on Linux and other open source software, designed primarily
for touchscreen mobile devices such as smartphones and tablets, the development is sponsored by Google.
2022 Stats show that Android is installed on more than 75% of all the smartphones, and 45% of all the
tablets in the world. (https://gs.statcounter.com/)

System software is software designed to provide a


platform for other software on the computer system.

5
Application Software
Application software is a type of computer program that performs a specific personal, educational, and
business function. Each application is designed to assist end-users in accomplishing a variety of tasks, which
may be related to productivity, creativity, or communication. A specific instance of such software is called a
software application, application program, application or app.
Examples of application software are Microsoft Word, spreadsheets, VLC media player, Firefox or Google
Chrome, accounting applications, photo editors, mobile apps such as video games, WhatsApp, etc

Application software is software that allows users to do user-oriented


tasks such as create text documents, play or develop games, create
presentations, listen to music, draw pictures or browse the web

Utility Programs
Utility programs help manage, maintain, and control computer resources. It is a form of system software as
the utility software helps to analyse and maintain and configure and optimise the computer to perform
optimally.

These programs are available to help you with the day-to-day chores associated with personal computing
and to keep your system running at peak performance.

What does System Software include? See picture below.

6
Examples of Utility programmes:

• Backup software

• Scandisk

• Compression software

• Spam and pop-up blocker utilities

• Anti-virus software

• File management software

Backup Software:
It is very important to have a back-up of important files on a computer in case your computer crashes.
Windows utilities has back-up software included in the system software.

Scandisk:
checks and repairs file systems errors on a disk drive like a hard drive.

7
Anti-Virus Software
Designed to prevent, detect and/or remove malicious computer viruses.

File Compression Software:


This utility makes it easier for us to save our files and folders, also to organize and manage them. File
compression software takes large files and folders that take a lot of hard disk space and reduces them to
smaller, easier-to-manage file sizes.

Spam and Pop-Up Blocker Utilities:


Pop-ups, such as “pop-up ads or pop-ups are often forms of online advertising on the World Wide
Web intended to attract web traffic or capture email addresses.” Pop-up blocker utilities became available
to stop these adverts popping-up while users are making use of the internet.

8
File Management Software:
Most operating systems include a file management utility to be able to open, create, edit, view, print,
rename, move, copy, delete, search/find, and/or modify file properties and permissions.
Windows explorer is the file management software included in windows operating software.

Utility software is software designed to help analyse,


configure, optimize, or maintain a computer.

Activity 1.1
1. Can any computer system work without an operating system? Motive your answer

2. True/False: The operating system is a type of system software, motivate your answer

3. Give the name of an operating system that is mostly used for smartphones

4. Mention two functions of an operating system.

5. Explain the difference between application software and system software.


6. Windows is manufactured by ……………………

7. APPLE OS X is manufactured by …………………..

8. Android is owned by which company?


9. Crossword Puzzle

9
Across
2. A multi user operating system developed by AT&T
3. Popular Microsoft spreadsheet application
9. A word processing application
10. A program used for protecting a computer from viruses
12. Microsoft standalone operating system

Down
1. No one owns this operating system
4. File management application for Windows
5. A Microsoft application for editing pictures
6. Apple operating system for desktop computers
7. Operating system for mobile phones
8. System software to scan and repair hard disks
11. Apple mobile operating system

10. Two different operating systems are illustrated in these pictures. Name the two different operating
systems each picture represents.

10
10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8

11. Which mobile OS is being brought out by Linux?

12. Is Firefox just an operating system, Motivate your answer?

13. What is the function of utility software?

14. True/False. WinZip is not a utility software? Provide a reason for your answer.

15. Name three different types of utility software.

16. Does Anti-Virus Software only detect viruses?

17. What is the term referred to when you get your data back from any other device?

18. What will you suggest to someone that has a lot of data that they want to back-up on a cd but the
information is just too much for the cd? Motive your answer.

11
UNIT 1.2: OVERVIEW OF CLOUD COMPUTING AND SEARCH ENGINES
This unit provides an overview of Internet technologies and two basic concepts thereof.

Purpose of the unit


At the end of this unit the learners should be able to:

• Demonstrate the use of Cloud computing, e.g. OneDrive / Dropbox / Google Drive, Google Docs / Google
Sheets
• Demonstrate an understanding of a Search engine (e.g. Google)

Cloud Computing: What It Is


Cloud computing refers to the use of resources that are offered as services over the internet and that are
shared.
Cloud computing typically involves (i) paying a subscription fee to (ii) access computing resources (iii)
remotely, using the Internet.
For the end users, “in the cloud” means that data is processed or stored somewhere on the Internet.
Saving to the cloud means you are saving to hard drives in remote locations. Physical location of data and
processing resource becomes irrelevant. This information does get stored on a physical computer
somewhere, usually on a server farm.
The data is always accessible if you have Internet connection. This means that you need a fast and reliable
Internet connection. The size of storage space and the power of processing are scalable (not fixed). Users
must pay a fee of be given access to use the cloud-based resources.

IaaS vs. PaaS vs. SaaS


Infrastructure as a service - pay-as-you-go access to
storage, networking, servers, and other computing
resources in the cloud
Platform as a service - access to a cloud-based
environment in which users can build and deliver
applications
Software as a service - a service provider delivers
software and applications through the internet

12
Some examples of online storage platforms include Dropbox, iCloud, OneDrive, Google Drive etc.

Cloud Computing: How It Works


A cloud user needs a client device such as a laptop or desktop computer, pad computer, smart phone, or
other computing resource with Internet access and a web browser (or other approved access route) to
access a cloud system via the World Wide Web. Typically, the user will log into the cloud at a service
provider or private company, such as their employer.
Cloud computing works on a client-server basis, using web browser protocols. The cloud provides server-
based applications and all data services to the user, with output displayed on the client device. If the user
wishes to create a document using a word processor, for example, the cloud provides a suitable application
running on the server which displays work done by the user on the client web browser display.

Picture to explain Cloud computing having secure access to all your applications and data from any network
device.

"The cloud" refers to servers that are accessed over the Internet,
and the software and databases that run on those servers.

13
Activity 1.2
1. Explain in your own words what cloud computing is.
2. What do you need to be able to use cloud computing?
3. List four uses of cloud computing.
4. Name any three examples of File Syncing services.
5. Is Gmail a cloud service?
6. Give three potential risks of using cloud computing.
7. Give three broad benefits of cloud computing.

Search Engines and Web Browsers


Before discussing Internet Search engines, we need to understand the concept ‘Web Browser’.

Web Browser
A web browser is application software that is used to retrieve, displays, and navigate through the
information found on the World Wide Web. That includes web pages, images, videos and various other files
Web browser examples such as:

Relevance and impact of web browsers on our personal lives:


The use of web browsers has become a daily activity to gain information from the internet. Browsers
enable people to do tasks easily and effectively such as language translation of content.
Browsers cannot only provide access to vast amounts of content; it also enables users to access social
media faster.

Search Engines
A search engine is a website that allows you to type in a keyword or a phrase and then searches through
the Internet to find websites that contain the keyword or phrase. A list of websites is then returned to the
user.
A web search engine or Internet search engine is a software system that is designed to carry out a web
search, which means to search the World Wide Web in a systematic way for information specified in a
textual web search query.
Simple explanation of how it works
A search engine creates an index of webpages using a program called a 'web crawler'. This automatically
browses the web and stores information about the pages it visits. Every time a web crawler visits a
webpage, it makes a copy of it and adds its URL to an index. Once this is done, the web crawler follows all

14
the links on the page, repeating the process of copying, indexing and then following the links. It keeps doing
this, building up a huge index of many webpages as it goes. (BBC, 2018)
The information that the web crawler puts together is then used by search engines. It becomes the search
engine's index. Every webpage recommended by a search engine has been visited by a web crawler. Search
engines sort results to show you the webpages they think are the most useful. The more hits a webpage
gets, the more useful it would seem to a search engine.
Advantages of a search engine
• A search engine performs searches at high speeds.
• Search results provide a huge variety of information.
• Advanced search options allow you to refine your results.
• Text, audio and video is provided with search engine results.
Limitations of a search engine
• Results may not be accurate.
• Search engine rankings are frequently inaccurate.
Examples of search engines:
List of Top 5 Most Popular Search Engines in the World (Updated 2020)
• Google
• Bing
• Yahoo
• Baidu
• Yandex.ru

A search engine is a software program that helps people find the


information they are looking for online using keywords or phrases.

15
How to Search?

Choose your words for the search carefully.

When you're deciding what words to put in the search box, try to choose words that are likely to appear on
the site you're looking for. For example, instead of saying ‘my head hurts’, say ‘headache’, because that’s
the word a medical site would use.
Don’t worry about the little things when searching in Google:
• Spelling. Google's spell checker automatically uses the most common spelling of a given word,
whether you spelled it correctly or not.
• Capitalization. A search for Cape Town is the same as a search for cape town.
Tips on how to perform effective searches
• Use specific keywords.
• Use OR, AND, NOT operators to search.
• Exclude irrelevant words such as the, and, where, what, a.
• Use synonyms if the search is not successful.
• Search for similar words by using the ~ operator, e.g., old~.
• Make use of exact phrases within quotation marks
• Use advanced search options e.g., filetype:pdf

Guided activity 1.3


1. Is Google only a search engine? Explain.
2. Learners to type in their “name surname” in the search engine. (eg. John Doe)
3. How is the search results different when you type: John and Doe (use your own name and
surname)?

16
4. What photos are available of the learner, when his/her name is being searched?

5. If you only want the search engine to search in South Africa type the following extension to your
name eg. John Doe site:za

6. Use three different search engines to search for the same topic. Write down the search used and
the name of each search engine. Indicate the difference between the search results.

7. Search weather to see the weather in your location, like weather Johannesburg, to find weather
for a certain place.

8. Put define in front of any word to find its definition. Find the definition of a given term such as
“Cloud computing”

Additional Activity for Practice Purposes:


Select a recent movie title.

1. Search the names of the cast/main actor (male and female)


2. On what social media platforms are they active?
3. Where do they reside?
4. In what other movies did they play?
5. What are their full names?
6. When were they born?
7. Who produced the music for the movie?
8. Which songs played during the movie?

17
Resources:
Videos:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahU
KEwiK88fNrM31AhWZgv0HHWVNC9AQwqsBegQIBBAB&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fwww.youtube.com%2
Fwatch%3Fv%3DR0DQfwc72PM&usg=AOvVaw20gAoeP2tN5zHy54vpwZ15
http://www.youtube.com/watch?v=BNHR6IQJGZs
To read:
https://www.hackcollege.com/blog/2011/11/23/infographic-get-more-out-of-google.html
Ideas for activities:
https://docs.google.com/presentation/d/1QbCY8VowB98NslEcorcbO9HR3Ef30tki3jJSHJuKErE/edit?u
sp=sharing

18
UNIT 1.3: OVERVIEW OF COMPUTERS IN EVERYDAY LIFE
This unit provides an overview of computers in everyday life. Online banking, shopping and e-schools are
examples of how computers changed our lives.

Purpose of the unit


At the end of this unit the learners should be able to explain:
• the use of ICTs in real life/ everyday life (such as shopping, banking and education)
• how their education can be supported by online/computer resources
• explain the features/characteristics of online banking and shopping

ICT in Everyday Life


ICT refers to the technological tools needed to gather, manage, store and communicate information. This
includes:
• Computers
• Networks
• Internet
• Telephones and lines
• Radio
• Television
• Cellular technology

Usage of ICT In Everyday Life

19
ICT in Education

• Home schooling is the buzz-word of the day. Students don’t have to attend classes at school or
university: they follow courses available on the internet.
• The need for printed text books is becoming less each day; subject content is electronically
available as e-books
• Equipment in classrooms become more technological advanced, e.g. the use interactive white
boards.
• Administration of learner marks and school administration are online available for better
communication and management of processes.
The use of ICTs ensures easy access to diverse information. It gives learners the freedom to learn at their
own pace. Quality material can be made available to learners anywhere in the world, even in the remotest
areas. It even makes available quality learning tools to students in the language that they are comfortable
with. ICT tools also allow interaction between peers and experts sitting anywhere in the world. Teachers
can also use Multimedia ICT tools to enrich the learning experience of students. ICTs can also track the
students’ progress and skill proficiency quickly and effectively. ICT tools and resources have, therefore,
become essential in education.

ICT in Banking

• Banking activity is immediately captured and records


updated as soon as they take place.
• Less cash is handled as payments can be made by means of
debit and credit cards.
• Individuals, as well as businesses, can do their banking
online.
• ATM services are everywhere available. There is very little
need for someone to go to a bank to draw or deposit
money.

20
Banking activities using computer system Non-computerised Banking
Transaction – anytime & anywhere Transaction working hours only
More productive activities as technology drives Activities are manual transactions at the bank
Process takes less time than at the counter Process takes long time inside the Bank at counter
Working hours are 24h per day Less productive

ICT in Business

Every business makes use of computerised and communications technology to increase efficiency and
productivity.

21
Computers and communication devices are used to:
• capture and process transactions
• do bookkeeping
• set up budgets
• gather information to assist management in decision making
• communicate with business partners and clients
• do research and banking on the internet
• enable EFT transactions
• do video conferencing, etc.
The influence of ICT on businesses includes:
• decentralisation – employees can work from home or anywhere in the world
• e-commerce – products and services are made available worldwide, sales via internet
ICTs have also radically changed the way businesses operate. The Internet has provided a huge market to
companies where they can display their products to a wider audience nationally and internationally. It has
reduced the cost of reaching out to consumers and, thus, enabled many smaller companies to compete
with larger companies. Use of ICTs has also enabled companies to make their internal working more
efficient and less costly. The payments can also be transferred quickly and safely online.

Activity 1.4
1. Define the term ICT
2. Give one example of the use of an ICT system:
a. At school
b. In the local shopping centre
c. At the airport
3. Discuss the following question in pairs and make a list of your conclusions:
Do you think that the global village is good for us, or does it impact negatively on our lives?
Motivate you answer in full.

Resources
Videos
https://youtu.be/5pdqku2-bac
https://www.youtube.com/watch?v=7q67poh7cga
https://www.youtube.com/watch?v=32m-6owqyfq
https://www.youtube.com/watch?v=u56ezxavkqk
Websites/Reading material
https://itchronicles.com/information-and-communication-technology/the-importance-of-
information-and-communication-technology-ict/
https://en.wikipedia.org/wiki/information_and_communications_technology
https://www.mindmeister.com/556737367/swot-analysis-on-the-use-of-ict-in-education

22
CHAPTER 2: KEYBOARDING PROFICIENCY
Chapter Overview

Unit 1
Touch typing practice using a
Typing Tutor

Chapter 2 Unit 2
Keyboarding Skills Numeric Keypad

Unit 3
Speed and Accuracy

Prior Knowledge

Grade 8 keyboarding skills

At the end of the chapter you should be able to:

• Master touch typing techniques

• Type with speed and accuracy

• Aim for typing 20 words per minute, accurately.

23
UNIT 1 KEYBOARDING PRACTICE
In grade 8 you learned about sitting correctly at the computer and to master the keyboard. You also used
the typing tutor to test your speed and accuracy.

You also learned to use the numeric keypad, the special characters on the keyboard and common shortcuts
to improve your keyboarding speed.

In Grade 9, you will continue to use the typing tutors to improve our typing speed and accuracy.

Speed, Accuracy, Remedial and Drill Activities


Use a typing tutor to continue practising your keyboard and accuracy skills.

There are many different typing tutors available to help you master the keyboard quickly and efficiently. You
will continue to practise and improve your keyboarding skills, take speed and accuracy tests and even
keyboarding games.
Your teacher will guide you in using a typing tutor, improving your skills and taking keyboarding and accuracy
tests.

Some typing tutors can be downloaded from the internet and used for free, while others can only be used
online while you have Internet connectivity.
The table below provides some examples of typing tutors (your teacher will advise you which to use):

Typing Tutor Comment

Klavaro

24
Tipp 10

Revision of Keyboarding fundamentals


Positioning o fingers

The following figure shows the 5-finger positions on the home row keys:

Finger Key

Left hand pinky A

Left hand ring S

Left hand middle D

Left hand index F

Right hand index J

Right hand middle K

Right hand ring L

Right hand pinky ;


https://www.typing-lessons.org/lesson_1.html

The Enter-key is pressed with the right-hand pinkie


finger to make a new paragraph.

The Spacebar is pressed with the thumb to make a


space between two letters or words

25
Important keys

If you want to use the keyboard correctly, we need to understand how to use the keys on the keyboard
correctly. In this unit you will learn about the function and correct use of Shift-key and the Caps lock key.
Both these keys are used to type capital letters, but in a different way:
Key Function and correct use
Shift-key The Shift key is used to type a capital letter.
There are two Shift-keys on the keyboard – one on the left and one on the
right.
To type a capital letter, you need to hold the Shift key while you type the
letter.
Once you release the Shift key, you will type small letters again.
The Shift key is generally used to type one capital letter at a time.
Caps Lock-key
When the Caps Lock key is pressed, the Caps lock is turned on.
Caps lock turned on
The Caps Lock key is on the left of the keyboard
When you press the Caps lock key, you will see a little light is turned on to
show that the key is locked for capital letters.
When the Caps lock is turned on, all the letters that you type will be capital
letters (you do not need to hold it in as in the case of the Shift-key).
The Caps lock key is generally used when you want to type a couple of capital
Caps lock turned off
letters or a sentence in capital letters.
To turn off the Caps lock key, you need to press it again. The little light will
then turn off to show the Caps lock is turned off.
When the Caps lock is switched off, the letters that you type will be small
letters.

Note:
You should not type many words or sentences/paragraphs with capital letters.
Capital letters appear bolder and "louder" than small letters or mixed letters
(Sentence case) and are difficult to read. One reason is that Capital letters look more
similar than lower case letters as they all have the same relative height.
Also, when you type in ALL CAPS (all capital letters), people interpret is as shouting.

If you want to use caps, rather use SMALL CAPS → it will be easier to read
Headings Sentences/Paragraph

26
UNIT 3 NUMERIC KEYPAD
In Grade 8 you learned to type numbers using the numeric keypad. In Grade 9, you will continue to practise
your numeric keypad skills using a typing tutor.

Numeric Keypad (Num Pad) and the Num Lock Key


The top row numbers are difficult to use for speed typing because the distance
between number row and the home row is far apart. For continuous number
work, it will be more beneficial to use the numerical pad (num pad).

Most keyboards also have a numerical keypad to the right-hand side of the
alphabetical keys. The Num Lock key (at the top left of the numeric keypad)
must be switched on before you can use the numeric keypad. On some
computers the Num Lock key is automatically switched on. You will have to
check and switch it on or off as you need to. This numeric keypad also has an
Enter key which has the same use as the Enter key on the alphabetical side of
the keyboard.

The numeric keypad is especially useful for people who input numbers on a
continuous basis.

When you are keyboarding for speed and accuracy it will be better to use the
alphabetical letters the numbers at the top of the keyboard as you will find it
much easier to stretch the home row fingers upwardly.

Figure 1 Finger positions for the num


pad

27
UNIT 3 SPEED AND ACCURACY
You should use a typing tutor program to do a formal speed and accuracy test during teaching time. A mark out
of 20 will be allocated for each 5-minute speed test as follows:

Component Mark
Speed 10
Accuracy 10
Total 20

The acceptable speed intervals for Grade 8 are 10 wpm, 15 wpm and 20 wpm.

Most good typing tutors would allow the you to select the duration of the speed test: i.e. 5 minutes. They
will give immediate results such as the Gross speed, the Accuracy % and the Net Speed.

It is a good idea to 'warm-up' by typing 1 and 2-minute drills or a 2-minute pre-test to before you do your
formal 5-minute speed test.

We will use the following table to allocate a mark out of 10 for the net Speed:

GRADE 8 GRADE 9
Net WPM Net WPM
Mark Mark
(Words per minute) (Words per minute)
20 or more wpm 10 30 or more wpm 10
19 wpm 9 29 wpm 9
17 to 18 wpm 8 27 to 28 wpm 8
15 to 16 wpm 7 25 to 26 wpm 7
13 to 14 wpm 6 23 to 24 wpm 6
11 to 12 wpm 5 21 to 22 wpm 5
10 wpm 4 20 wpm 4
Less than 10 wpm 0 Less than 20 wpm 0

The Accuracy mark out of 10 will be rounded up or down based on the Accuracy of the Gross speed, i.e.
81% will rounded down to a mark of 8/10 and 86% will be rounded up to mark of 9/10, etc.
EXAMPLE:

Figure 2 Results received from a typing tutor

28
According to the results above a Grade 8 learner would be allocated marks as follows:

Net Speed: 10/10


Accuracy: 8/10
Total: 18/20

We hope that you will receive a Certificates of Accomplishment for your speed and accuracy, and that you
add it to your portfolio, for example:

Figure 3 Example of a Certificate of Accomplishment

29
CHAPTER 3: WORD PROCESSING
CHAPTER OVERVIEW

Unit 3.1 Term 1


exploring WordArt and text boxes in word
WordArt and Text boxes processing software

Term 1 exploring headers and footers in word


Unit 3.2
processing software
Headers and Footers
Chapter 3
Word Processing Unit 3.3
Term 2
exploring SmartArt in word processing
SmartArt Graphics software

Term 3
Unit 3.4 introduction to an automatic table of
Table of Contents contents in word processing software

At the end of the chapter, you should be able to:

• Insert and manipulate WordArt and text boxes;


• Insert document header and footers;
• Insert and manipulate SmartArt graphics;
• Insert an automatic table of contents using headings created with styles from the style gallery

Having the following will be to your


advantage:

• Basic computer skills


• Basic typing
• Basic word processing skills

30
Create a folder called “Practical assignment_Your Name” where you will be able to easily access it again.
Your teacher will give you data files to work with when exploring Word. These files and all other practical
work will be saved in this folder. Remember to save your work every few minutes. Learn to use the shortcut
Ctrl + S to save while you work.

UNIT 3.1: WORDART AND TEXT BOXES


What is WordArt?

WordArt is a text styling utility available in Microsoft Office applications such as Microsoft Word, Excel,
PowerPoint and Publisher. It provides special effects like outlines, gradient glow, shadow, bevel, textures
and 3-D effects to text, which are not available in the standard font formatting tools. For example, you can
apply a glow or reflection to your text. You can also change the shape of text using WordArt. Word provides
many WordArt styles that can be applied to text to make a visual and creative statement.

EXAMPLES OF USING WORDART

GUIDED ACTIVITY 3.1.1


Open the existing word document “GA 3.1.1 WordArt” from your “Practical assignment_Your Name”
folder. Refer to the image of the ribbon below, as well as the ribbon in the word processing program on the
computer and then follow the instructions:

1. Select the words “4IR”. Click on the Insert tab, in the Text grouping. Click on the drop down arrow
next to the WordArt icon. A new window like in the image below will appear, containing different
WordArt options.

2. Select the WordArt option: Gradient Fill – Gold, Accent 4, Outline – Accent 4.

31
3. The WordArt heading “4IR” appears to the left of the text. Move the WordArt to the right
of your document (remember to make use of Wrap Text).

4. Make changes to the WordArt that you have entered.


Select the WordArt again. A new tab called “Drawing Tools”, containing the “Format” tab
will open.
The Format tab consists of the following different groupings.

Text Fill
Fill the text with a solid color, gradient,
picture, or texture

Text Outline
Customize the outline of your text by
choosing the color, width and line style.

Text Effects
Turn your work into a work of art.
Add a visual effect such as shadow, glow or
reflection to your text.

Choose any of the features above to make changes to the WordArt.


Save and close the document.
What are Text boxes?
Text boxes are chosen from the Text grouping on the Insert tab. An on-screen rectangular frame into which
you can type text is inserted. The text box can be moved around on the page depending on where you
would like to place it.
Text boxes can contain many different types of elements and are handy when you need to insert
information in a specific place on the page. You can format text boxes in many ways depending on the task.
Text boxes expand your formatting repertoire by offering additional control and flexibility for how the text
appears. You can place a text box anywhere within a document and format it with different colours and
fonts.

EXAMPLES OF TEXT BOXES

[Grab your reader’s


attention with a great
quote from the
document or use this
space to emphasize a key
point. To place this text
box anywhere
GUIDED ACTIVITYon3.1.2
the
page, just drag it.]
Open the existing word document “GA 3.1.2 Text boxes” from your “Practical assignment_Your Name”
folder and follow the instructions:

32
1. Change the heading in the document to WordArt by following the method described previously. Select
any type of WordArt style. Make sure to have the Wrap Text set to “In line with text”

2. Insert a text box between the main heading and the first heading:
Click on the Insert tab, in the Text grouping, click on the drop down arrow next to the Text Box icon.

A pop-up window will appear with different types of Text Box options to choose from. Click on the
Austin Quote option. The text box will appear in your document.

3. Move the heading and text of the first paragraph into the text box by doing the following:
Select the first paragraph together with the heading (“Why we work”). Click on CUT; select the text in
the text box and click on PASTE. (You may also use the keyboard shortcuts Ctrl + X to cut and Ctrl + V
to paste.)
4. Your text box should appear similar to the text box below:

33
5. Move your cursor to the end of the document. Insert the Sideline Quote text box. Refer to the method
explained above. Move the last paragraph including the heading (“Where will we work”) into the text
box.
Save and close the document.

ACTIVITY 3.1.1
Open the file “Activity 3.1.1” from your “Practical assignment_Your Name” folder and make the following
changes to the document:
1. Change the left and right margins of the document to 2 cm.
2. Add a main heading Flowers by using WordArt with an “Inner shadow” and purple colour.
3. Locate the phrase from Mohandas K Gandhi on page 1 and change this text so that it appears in bold
and italic.
4. Modify the FOUR headings that are formatted with Heading 1 style to the Intense Quote style.
5. Find all occurrences of the text “roses” and replace it with “flower”.
6. Insert the picture “Roses.jpg” at the end of page 5 and change the picture size to 3 x 5 cm.
Save and close your document

ACTIVITY 3.1.2
Open the file “Activity 3.1.2” from your “Practical assignment_Your Name” folder, make the following
changes to the document:
1. Insert a 1.5pt, green page border only on the first page.
2. Move the title “The Journey of Flowers” into a red, 3 pt textbox.
3. Apply paragraph spacing of 6 pt after to the fourth paragraph starting with “The garden was....”.
4. Change the text under the paragraph “Special features...” on page 2 to a bulleted list.
5. Change the page orientation of only page 5 to landscape.
6. Find the text “The Mokha restaurant is open seven days a week” on page 5.
Insert and apply a tab stop as follows (note the dotted line):

Save and close your document.

34
UNIT 3.2: HEADERS AND FOOTERS
A header is a section of a document that appears in the top margin of each page, and a footer is a section
of a document that appears in the bottom margin of each page.
What are the uses of headers and footers in a Word document?
Headers and footers are used to display text or images that you want to appear on every page of a
document without having to type it individually on each page.
Headers and footers are used in multiple-page documents to display descriptive information. In addition to
page numbers, a header or footer can contain information such as the document name, the date and/or
time you created or revised the document, an author name, a graphic, a draft or revision number.
This descriptive information can appear in many different
combinations. For example, the second page of a business
letter typically contains a header with the name of the
addressee, the page number, and the date. A report can
contain a footer with the report name and a header with the
page number and chapter name. A newsletter can contain a
header with a title and logo on the first page and a footer with
the title and page number on the pages that follow.

GUIDED ACTIVITY 3.2.1


Open the existing word document “GA 3.2.1 Great Career Fields” from your “Practical assignment_Your
Name” folder and follow the instructions:
1. To open a header or footer, click on the Insert tab and select the Header & Footer grouping. Click on
the down arrow next to the Header icon. Follow the same method to open the Footer.

Take note that it is not possible to have both open at the same time. You can toggle between the
header and the footer. On the Navigation grouping, click on the Go to Footer icon. Your document will
display the footer. Alternatively, you can double click in the header or footer section to open it.
2. Work in the header: from the second drop down menu click on the Austin option. The header option in
your document will open, requesting you to type in information.
Type your name and surname in the header.

35
3. When working in a header or footer a new main tab appears on the ribbon: the Header and Footer
Tools tab with the Design tab under it. The different groupings in the Design tab enable you to edit and
format the header or footer. Refer to the image of the ribbon below, as well as to this section of the
ribbon on the computer:

4. To add automatic page numbering to the footer, click on the Page Number icon’s drop down arrow (in
the Header & Footer grouping). Click on the arrow next to “Bottom of page” and click on the Accent Bar
1 option.

The document footer displays the following:

When you have completed entering information in the Header and Footer, click on the Close
Header and Footer in the Close grouping to exit.
5. Save and close your document.

ACTIVITY 3.2.1
Open the file “Activity 3.2.1” from your “Practical assignment_Your Name” folder and make the
following changes to the document:
1. Adjust the top and bottom page margins to 3 cm.
2. Add a header with your name and surname, right aligned

36
3. Find the bulleted list under the heading ‘Urbanisation’. Change the bullets to the symbol 
(Webdings, character code 08).
4. Insert page numbers in the footer of the document in any format.
5. Change the bulleted list under the heading ‘Industries’ to resemble the following:

6. At the bottom of the document a logo was created using some shapes. Make sure that the different
elements of the logo can be moved together.
Save and close the document.

ACTIVITY 3.2.2
Choose the correct answer and write the letter next to the number in your writing book:
1. You want to insert text in the header of a document, but only from the third (3rd) page. Which of the
following techniques will you use to accomplish the task?
A. Insert a section break before page 3
B. Insert a page break before page 3
C. Go to the 3rd page and insert header
D. Use a Quick Style
2. You want the date on which a document was created to appear at the top of each page. What will you
do to accomplish the task?
A. Type the date at top of each page
B. Create a template
C. Type the date into the footer
D. Type the date into the header
3. You are working on a book which consists of about 500 pages. The page numbers must appear at the
bottom of each page. What will you do to accomplish the task?
A. Type the page number into the header
B. Create a template
C. Type the page number on each page
D. Type the page number into the footer

37
UNIT 3.3: SMARTART
What is SmartArt?

SmartArt is a visual representation of your information and ideas. Rather than constructing diagrams from
scratch, SmartArt includes a range of graphics that you can use to help you build simple or complex
diagrams, such as flow charts, process charts, organisation charts. Select a SmartArt graphic from the
gallery and then customise it to suit your needs. SmartArt will help you to create professional-looking
diagrams in minutes.

What is the difference between SmartArt and WordArt?

WordArt adds fancy text to your word document. SmartArt adds charts, lists and diagrams to your
document.
Examples of SmartArt:

GUIDED ACTIVITY 3.3.1


Open a new word document and save the document as “GA 3.3.1 SmartArt basic” from your “Practical
assignment_Your Name” folder and follow the instructions:
1. To add SmartArt to a document click on the Insert tab and select the the SmartArt button in the
Illustrations group.

2. A new window containing the


different types of SmartArt
available will appear.

38
3. Click on the Hierarchy option available on the left side of the window. Select the Horizontal Hierarchy
option in the second window. A preview of the type of SmartArt selected will be displayed in the third
window. Click on OK and the SmartArt will be placed in the document.

4. Use this diagram to show the management structure of a school. Type the word “Principal” in the first
block and “Deputy Principal” in the next two blocks.

5. Each “Deputy Principal” is responsible for two “Head of Departments” (HOD). There are not enough
blocks next to the second Deputy Principal. Add another block there by following the instructions:
Click in the second “Deputy Principal” block. A new tab “SmartArt Tools” appears. In the Design tab in
the Create Graphic grouping click on the Add Shape drop down arrow, then click on the Add Shape
Below.

The second block will be added to the second “Deputy Principal” block.

6. Type the words “HOD” in each of the blocks connected to the two Deputy Principals’ blocks. Your
SmartArt should display as follows:

39
7. Change each grouping of blocks to different colours by doing the following:
Select the “Principal” block. On the Design tab, in the SmartArt Styles grouping, click on the down
arrow next to the “Change Colors” icon. Select the first option in the “Accent 1” grouping.

8. Your final SmartArt should display as follows:

Save and close your document.

GUIDED ACTIVITY 3.3.2


If you want to add pictures to SmartArt, an option is available in the SmartArt illustrations group to do so.
Open a new word document and save the document as “GA 3.3.2 SmartArt picture” from your “Practical
assignment_Your Name” folder. Follow the instructions:
1. Click on the Insert tab. In the Illustrations grouping click on the SmartArt icon.

2. A new window will appear with the different types of SmartArt available. Click on the Picture option
available on the left side of the window. Select the second option in the third row of the second
window. A preview of the type of SmartArt selected will be displayed in the third window.

40
3. Click on the picture icon in the shape to open the Online Pictures option. If you do not have an
Internet connection, choose the Work Offline option to select a picture from your computer.

4. The following is an example of what the SmartArt containing pictures will look like:

Save and close your document.

41
ACTIVITY 3.3.1
Open the document “Activity 3.3.1” saved in your “Practical assignment_Your Name” folder
and do the following:
1. Indicate the process of baking flap jacks by using a SmartArt diagram. The order of the process
is important.
Captions to use below the pictures in the diagram are provided in the document. Pictures to
be used together with the captions are provided in the folder “Flapjacks”.
2. Refer to the guided activities above to choose a suitable SmartArt diagram. You must be able
to add pictures and a caption below each picture.
3. Insert the pictures and match the captions to the pictures to display the process in the correct
order. Add arrows between the pictures to indicate the order.
4. Wrap the SmartArt to move it down on the page. Group the arrows if necessary.
5. Add the heading “Baking Flapjacks” and format it to WordArt of your choice.
Save and close your document.

ACTIVITY 3.3.2
Choose the correct answer and write the letter next to the number in your writing book:
1. Stanley is working on a document. He inserts a SmartArt graphic in the document. He selects a shape
and wants to decrease the size of the selected shape. Which of the following will he choose to
accomplish the task?
A. Shapes
B. Shape Effects
C. Text Effects
D. Format, Size
2. Johanna inserts a SmartArt graphic into a document. She wants to change the layout of the SmartArt
graphic from left-to-right to right-to-left. Indicate which grouping option she should choose to
accomplish the task.

A. B. C. D. E.

3. You insert a SmartArt graphic into a report, but want to change the 3D style of the SmartArt graphic.
Which of the following will you use to accomplish the task?
A. Reset graphic
B. SmartArt styles
C. Text effects
D. Shape effects
4. Sophy inserts a SmartArt graphic into a document. She wants to add a text bullet to the SmartArt
graphic. Indicate which grouping option she should choose to accomplish the task.

42
A. B. C. D. E.
5. You have inserted a SmartArt graphic into a document and want to increase the level of the bullet in
the SmartArt graphic. Which of the following will you use to accomplish the task?
A. Text Pane
B. Add Bullet
C. Promote
D. Demote

43
UNIT 3.4: BASIC TABLE OF CONTENTS
An automatic table of contents (TOC) is a list of paragraph, chapter or section titles, or brief descriptions
with their commencing page numbers, usually found on a page before the start of a written work. A TOC in
an electronic document enables the reader to navigate to a specific heading and paragraph in the
document by holding in the Ctrl button and click at the same time with the mouse. When the TOC is
inserted an outomatic link to the page number on which the heading appears is created.
How to create a table of contents in a Word Processor:
Creating a table of contents in a Word document is a two-step process:
• identify the text that you want to appear in the Table of Contents and apply a style to it;
• use the built in feature to insert the Table of Contents.
1. Identify the text that you want to appear in the Table of Contents
In your document, select the heading that you want to appear in the Table of Contents. Apply a Heading
style to that paragraph.
The easiest way to apply the Heading style is to click on the Home tab, in the Styles group and select the
Heading thumbnail. Refer to the ribbon below:

Apply the Heading 1 style to major headings in your document. Apply the Heading 2 style to sub-headings,
Heading 3 style to sub-sub-headings, etc.
If you prefer a different font, font size or colour, modify the heading style in
the Styles group.
Tick the check box ”Automatically Update” to apply any modifications
automatically to all headings of the same styl.

GUIDED ACTIVITY 3.4.1


Create the Table of Contents
Open the existing word document “GA 3.4.1 Table of Contents” in your “Practical assignment_Your
Name” folder and follow the instructions:
1. The headings and subheadings in the document have already been formatted to styles.
2. In the References tab open the “Table of Contents” grouping.

Click on the drop down arrow next to the Table of Contents button to open a new window:

44
Choose the style of Table of
Contents you wish to insert.
Automatic Table 1 creates a TOC
titled Contents. Automatic Table
2 creates a TOC titled Table of
Contents.
Word will create a TOC from the
document text you styled with
one of the heading styles.
The TOC might include a string of
dots called leader dots between
the heading text and the page
number of each heading,
depending on the style of TOC
chosen.
Hold Ctrl and click on one of the
page numbers to navigate to that
location in the document.

3. Place your cursor at the beginning of the document and select the second option “Automatic Table 2”.
Your table of contents will be generated and will display as follows:

Save and close your document.

ACTIVITY 3.4.1
Open the file “Activity 3.4.1” in your “Practical assignment_Your Name” folder and make the following
changes to the document:
1. Add a page border of your choice so that it appears only on the first page of the document.
2. Add automatic page numbering, in the format Page X of Y, as a right-aligned footer.

45
3. Apply the Heading 1 style to all the heading highlighted in yellow and
the Heading 2 style to all headings highlighted in green.
4. The pink highlighted headings have been mistakenly formatted to Heading 2. Clear the Heading style
format of these headings.
5. Insert an automatic Table of Contents on the second page of the document. Use the Automatic Table 2
format.
6. Replace all occurrences of the text RHS with the words Rainbow HS. There will be 18 results.
7. Locate the heading Matric Results on page 3 of the document.
Copy the contents of the file, Quote.txt, and paste it in a text box anywhere to the right of the
heading. The text must be centred and formatted to Comic Sans font.
8. Locate the numbered list of five items on page 4 (Participation down to Gold). Replace the numbered
list with a bulleted list, using Wingdings character number 252 (✓).
9. Modify the Heading 3 style so that it appears with a SMALL CAPS effect. Ensure that the modification is
applied to all occurences of this style.

ACTIVITY 3.4.2
Choose the correct answer and write the letter next to the number in your writing book:
1. The Table of Contents (TOC) list will create a link to which paragraph feature?
A. Fancy Formats
B. None, TOC is not a paragraph feature
C. Heading Styles
D. Layout
2. When should Heading Styles be applied in the TOC process?
A. Apply Heading Styles while creating the TOC.
B. Apply Heading Styles after creating the TOC.
C. Apply Heading styles before creating the TOC
D. It is created automatically as you type.
3. Why are page numbers required for a TOC?
A. Numbers are automatically added when the TOC is created
B. To find the page on which a heading and topic appears.
C. To avoid confusion.
D. To show what the content is about.
4. What is the role of styles when creating a TOC?
A. Styles are used to automatically create a table of contents.
B. Styles display the TOC in a professional format.
C. Styles enable a user to format a document uniformly.
D. Styles enable a user to update all headings at once.
5. What does format refer to in a word processing document?
A. How a table will be displayed.
B. Font, size, colour, indents and general layout of a document.
C. How to erase the document and start fresh with a template.
D. Different heading styles in relation to each other.

46
6. Where is the table of contents located in a document?
A. On the first page of the document
B. After the cover page
C. Usually within the first 3 pages of a document
D. At the end of the document
7. The dots between a list item in a TOC and the page number are called:
A. Leader dots
B. Outline
C. Connector dots
D. Gutter

CONSOLIDATION ACTIVITY
This activity consolidates the wordprocessing features and functions referred to in this chapter.
Open the file "Consolidation Act1" and make the following changes to the document:
1. Change Page Margins to "Narrow"
2. Insert a Page Break before the heading "How can we embed digital …"
3. Select the heading "How can we embed digital …" and change it to WordArt (Fill: Orange, Accent Color
2; Outline: Orange, Accent Color 2).
4. Select the underlined headings and change the Heading Style to "Heading 1". These headings should
no longer be underlined.
5. Create the following SmartArt in the position indicated by the yellow highlighting in the document.
The SmartArt colour may differ from the SmartArt below, but it must be colourful.

Basic Literacy

Global Scientific
Awareness Literacy

Multicultural Economic
Literacy Literacy

Information Technological
technology Literacy

Visual
Literacy

6. Add the following header and footer to your document:


a. Your Name and Surname in the left-hand side of the header
b. Your Grade in the right-hand side of the header
c. Insert page numbering in the centre of the footer. Choose the Dots format.

47
7. Insert the following TWO textboxes at the end of your document, next to one another.

What is digital literacy? Importance of


Digital literacy
8. Insert a Table of Content on the first page. Make use of the Automatic Table 1.
Save and Close your document

REFERENCES
https://www.exam-labs.com/exam/77-601

https://youtu.be/0DktrZ-SfE0?t=249

https://wordribbon.tips.net/t012658_understanding_wordart.html

https://www.teachucomp.com/insert-wordart-in-word-instructions/

https://youtu.be/CzUEn-KB9C8?t=34

https://support.microsoft.com/en-us/office/add-copy-or-remove-a-text-box-in-word-57e099ac-0525-46ae-
8109-8a1d844f5834

https://www.lifewire.com/text-boxes-in-microsoft-word-3539988

https://www.howtogeek.com/360034/how-to-create-and-format-a-text-box-in-microsoft-word/

https://youtu.be/slateuunUhY?t=21

48
CHAPTER 4 COMPUTATIONAL THINKING
Chapter Overview

Unit 4.1
Revise Pattern
Revision of Term 1
Recognition and
Computational Thinking
Algorithms from Grade 8
concepts

Unit 4.2 Term 1 Extend computational


Abstraction and
thinking concepts
Decomposition
Chapter 4
Computational Thinking
Unit 4.3 Term 2
Explore various ways to
Representation of
represent an algorithm
Algorithms

Putting it all together


Unit 4.4 Term 3 Apply computational
Consolidation thinking to solve a
problem

Prior Knowledge

Computational thinking
concepts and content learned in
Grade 8

At the end of the chapter you should be able to:

• revise and expand your understanding of computational thinking


• explain the cornerstones of computational thinking
• understand that algorithms can be represented in various ways
• explain how computational thinking helps to complete tasks or solve problems
• use computational thinking to complete tasks and solve problems

49
UNIT 4.1: REVISION OF COMPUTATIONAL THINKING CONCEPTS
In this unit you will revise the computational thinking concepts learned in Grade 8 and expand on the
cornerstones to look at decomposition and abstraction in more detail.

What Is Computational Thinking?


Computational thinking is an attitude and skill set that helps one to systematically solve problems using
specific techniques and strategies where the solutions to the problems can be understood by both humans
and computers.
Thinking computationally is therefore important when you learn to code/program as you have to create a
solution that the computer can understand and execute.

Four cornerstones of Computational Thinking

Abstraction Decomposition Pattern Recognition Algorithm

Focusing on the Solving a complex Identifying similarities Defining a precise


relevant and important problem by breaking it and differences. sequence of steps or
information and into small manageable It helps you to make instructions to perform
ignoring unrelated and parts where each part connections between a task.
irrelevant things. is more similar problems and An algorithm is a set of
Helps you to get to the straightforward and experiences. rules or instructions
heart of the problem easier to solve Recognising the same that anyone can follow
Finding general patterns in other to perform a task or
principles that create problems helps you in solve a problem
patterns solving a new problem

Examples of computational thinking

Abstraction Decomposition Pattern Recognition Algorithm

A world map is an Break up the task of Irregular heartbeat can Steps/Instructions for
abstraction of the making breakfast in be identified looking at making toast (1
earth in terms of several smaller tasks: deviations from the subtask in making
longitude and latitude, Make toast normal pattern. breakfast)
helping us describe the Bake egg This can help to
location and geography Make coffee diagnose medical
of a place conditions

50
Activity 4.1.1
1. Watch the following videos to revise your understanding of the computational thinking pillars you
covered in Grade 8 and answer the questions that follow:
Concept Type in URL
Computational thinking https://youtu.be/mUXo-S7gzds
Pattern recognition https://youtu.be/cbZUnuyxcVs
https://youtu.be/R0m9iLUx1FQ
Algorithmic Thinking https://youtu.be/uvsQPXJaulU
a. What is computational thinking?
b. What is the purpose of computational thinking?
c. Describe the Pattern recognition and Algorithmic thinking cornerstones by
i. Defining pattern recognition and algorithmic thinking
ii. Providing an everyday example to illustrate pattern recognition and algorithmic thinking
iii. Explaining how pattern recognition and algorithmic thinking could be helpful to complete a task
or solve a problem.
Let us quickly revise the corner stones that we expanded on in Grade 8: Pattern Recognition and Algorithms

Pattern recognition
Recognising patterns helps you to identify similarities, shared characteristics and/or differences within or
between problems. This helps to make predictions or to generalise solutions. If one can identify a pattern,
one is generally able to predict, for example, the next item in a series or the next step in completing a task.

Pattern – The way in which something is arranged (usually with repetition) or in which it happens or is
done.

Pattern recognition is therefore the process of recognising patterns, e.g. in data or behaviour.
Pattern recognition is based on the five key steps of:
• Identifying common elements in problems or tasks
• Identifying and interpreting common differences in problems or tasks
• Identifying individual elements within problems or tasks
• Describing patterns that have been
identified Predictions are the connecting links
• Making predictions based on between what you already know, with
new information or knowledge.
identified patterns.
How are patterns and pattern recognition helpful?
• Identifying patterns can point you to an To generalise is to look at specific cases;
existing solution that you can use to solve a identify a pattern or relationship that will
always be true; then represent the pattern
new problem.
in symbolic format.
• Patterns help us to make predictions
• Pattern recognition helps us to generalise

51
In Grade 8, you have looked at different geometrical shapes: (square, pentagon, hexagon, heptagon and
octagon) and the pattern/ relationship between these.
Square Pentagon Hexagon Heptagon Octagon Circle

Number of sides 4 5 6 7 8 360


Number of angles 4 5 6 7 8 (360)
Size of interior angle 90° 72° 60° 51,4° 45° 1°
Sum of interior angles 360° 360° 360° 360° 360° 360°

You have noticed the following/identified the following patterns/trends/relationships:


• As the number of sides increases Octagon within a circle
o the size of the interior angles decreases
o the form of the shape gets closer to a circle

• The sum of the interior angles of a shape equals 360° and


a circle is also 360°
The information helped you to make more observations:
• The size of the interior angles for each shape can be calculated
by dividing 360° by the number of sides, e.g. for the pentagon
the interior angles can be calculated as 360/5 = 72.
• There is a relationship between the number of sides, the size of the interior angles and a circle
(360°).
• These patterns and relationships help to generalise the solution/algorithm for drawing shapes by
finding general principles that create patterns. Look at the following:
Square (4 sides) Pentagon (5 sides) Circle (360 ‘sides’) N sides
Repeat 4x Repeat 5x Repeat 360x Repeat n times
Turn 360/4 (90°) Turn 360/5 Turn 360/360 Turn 360/n
Move 360/4 steps Move 360/5 steps Move 360/360 steps Move 360/n steps

The generalised algorithm for drawing shapes allows us to draw any shape – from a triangle to a circle! – by
understanding the relationship between the steps; the size of the angles and a circle (a circle as 360 “sides”
that forms the round shape).
You can therefore abstract a generalised algorithm by identifying the general principles that create the
pattern.

Algorithmic Thinking
An algorithm is an ordered list of well-defined steps or instructions that you can follow to perform a task or
solve a problem.

These instructions are often expressed as something that humans can understand. Eventually these
instructions must be translated into a sequence of computer instructions using enough detail so the
computer can execute the instructions.

52
Sequence and detail
Sequencing is putting events or information in a specific order. It is the skill that helps you to plan what
steps to take in which order to perform a task successfully.
Detail means considering every aspect or minor part of something. It is to describe or give exact
information about something. The steps or instructions to perform a task need to be unambiguous – they
need to be precise and clear to avoid misinterpretation or different interpretations by different people.
How are sequence and detail helpful?
In sequencing, we learn about patterns in relationships. We also learn to understand the order of things. By
learning to sequence, we develop the ability to understand and arrange purposeful patterns of actions,
behaviours, ideas, or thoughts.
Attention to detail is important because it helps prevent mistakes and ensures successful completion of a
task.
Developing an algorithm
To develop an algorithm, you must identify what needs to be done (the instructions) and the order in which
they must be done.

When developing an algorithm, each instruction is identified and the sequence in which the instructions are
carried out, is planned and must be logical.

What makes a good algorithm?


Some algorithms are better than others. So, what should we consider when we design algorithms that will
ensure they are good algorithms, especially if the algorithm must be understood by non-humans such as a
computer or a robot?

Have
• Begin (First step? Where do I start?)
limited • Middle (What comes in-between?)
number of • End (How does it end? Last step?)
steps

• Easy to understand and follow


• Detailed and specific
• Clear and unambiguous
Steps / • In correct, logical sequence
Instructions • Complete - it solves every aspect of
the problem
must be • Efficient - solves tproblem making best
use of resources - takes the shortest
route

Each step/ • Consist of a single task


• Be at the most basic level, i.e. cannot
instruction be broken down into more simpler
must parts

Have at
• There must be at least one output or
least one accomplishment
result

53
In Grade 8, you learned that one can draw a square using a sequence of instructions or algorithm.
To develop the algorithm, you first look at the diagram of a square to analyse the problem. From your
previous experience with geometrical figures, you know that all the angles in a square are 90 degrees and
that all the sides have the same length.
You then realise that the problem can be broken down into smaller sub-problems by drawing one side at a
time:
1. Turn 90 degrees left
1
2. Draw a 3 cm line
The instructions follow a specific pattern: the
3. Turn 90 degrees left
2 same two instructions are repeated four times
4. Draw a 3 cm line
5. Turn 90 degrees left
3
6. Draw a 3 cm line
7. Turn 90 degrees left
8. Draw a 3 cm line 4

You also learned to recognise patterns and realised that some steps in the above algorithm are repeated
and that one can shorten the algorithm as follows:
Repeat 4 times
Turn 90 degrees left
Draw a 3 cm line
Through abstraction, you can now come up with a generalised formula for drawing a square, no matter
how big the square must be:
Repeat 4 times
Turn 90 degrees left
Draw a line that is n cm long
By substituting n with different values, you will be able to draw several squares of various size.

Guided Activity 4.1.2


1. The Scratch code provided was created using pattern
recognition and algorithmic thinking. Open the
program A4_1_2 and follow the instructions below:
a. Run the code – a square is drawn
b. Change the number of sides and steps (all the
4’s) to 5 and watch the sprite drawing the
pentagon.
c. Now change the number of sides and steps to
6 and 8 respectively and watch what happens.
d. Finally, change the number of sides and steps
to 360 and watch what happens.
We see that by only changing the number of sides, we can
use the code to draw different shapes.

54
UNIT 4.2: ABSTRACTION AND DECOMPOSITION
In this unit you are going to learn more about decomposition and abstraction.

Abstraction
Abstraction is when you focus on the important and relevant information of a problem and ignoring
unrelated and irrelevant things or the things you do not need. It therefore helps you to get to the heart of
the problem. It also helps to create a representation of the problem you are trying to solve.
Abstraction can also be seen as simplifying problems or systems by hiding the detail.
Let us look at the following examples of abstraction:
Abstraction Comment
Image of a cat You can see it is a cat, but you cannot see any detail such as what
type of cat it is, colour, etc.
You do, however know that all cats have certain characteristics
such as 4 legs, whiskers, colour, meows, etc.
Sometimes you just need to know it is a cat, without the need to
focus on specific detail

Abstraction can also be described as the gathering of the general characteristics one needs and the
filtering out of the details and characteristics that one does not need. For example, the category
‘mammal’
The word ‘mammal’ is and abstraction for a warm-blooded,
vertebrate animal of a class that is distinguished by the
The word ‘Mammal’
possession of hair or fur, females that secrete milk for the
nourishment of the young, and (typically) the birth of live young.
User Interface Your mobile phone uses a graphical user interface (GUI). When
phoning a friend, you only tap the phone icon, then
enter the number or select a name and call.
You are unaware of the technology and code behind these
actions that makes calling happens

Sometimes one needs to take a step back from detail and focus on the big picture, for example, when
driving a car, we use abstractions such as start, drive, stop that imply general patterns or actions without
the necessity of understanding specific details:
Abstraction General patterns Specific details hidden from the driver
Start Use the key (or the button) to start the car You don't need to know how the ignition
system of the car works
Drive Use the gears and push the petrol pedal to You don’t need to know the mechanics of
let the car move gears or what happens under the engine
hood

55
Stop Apply the brake You don't need to know the mechanics and
how the braking system works
We can use abstraction to
• organize things, for example, a human is a mammal, a mammal is an animal, and so on.

• see the “big picture” so we can reason without thinking about the details.

• transfer learning or learning by analogy.

Guided Activity 4.2.1


When using a computer, we use abstractions such as start-up and log in that imply general patterns or
actions without the necessity of understanding specific details:
Abstraction General patterns Specific details hidden from the driver
Start-up Switch on the computer pressing the You don't need to know the computer
power button architecture or the technology behind the
‘start-up’ process
Log in Type in your username and password You don’t need to know the technology or the
code behind the ‘log in’ process.

Abstraction in coding is also used to simplify code into different functions hiding the underlying complexity.
For example, when we play a boardgame, we use the word ‘roll’. Every player understands that ‘roll’ means
using the dice to get a random number from 1 – 6. The word ‘roll’ is an abstraction.

The same type of abstraction applies when programming. Implementing ‘roll’ in a boardgame app means
giving a way to randomise the numbers 1 – 6. We can refer to ‘roll’ throughout the game and understand
what is meant without having to think about how exactly it is done by the computer program. All that is
needed is that the program includes a description (instructions) somewhere of how rolling is to be done.
The Scratch code on the right uses abstraction to implement ‘Roll’ (roll dice) and ‘Move’
(move charm). The detail behind these two instructions are hidden.
It is now also possible to reuse these instructions (Roll and Move) elsewhere in the
program should one wants to get a random number and move the charm.
Open Scratch and load the Scratch file Abstraction.sb3.
a. Inspect all the code. Can you explain the code?
b. Can you explain the detail behind the instruction ‘Roll’? (What will happen if the computer receives this
instruction)

56
c. Can you explain the detail behind the instruction ‘Move’?
Now, watch the following video for a better understanding of abstraction in coding by
typing the URL below into your browser or scanning the QR code
https://youtu.be/5BBGuJ1UgJg

57
Activity 4.2.2
1. Watch the following video on abstraction to enhance your understanding of abstraction and answer
the questions that follow:
Concept Type in URL
Abstraction https://youtu.be/jV-7Hy-PF2Q

a. Describe Abstraction in your own words


b. Provide an everyday example to illustrate abstraction
c. Explain how abstraction can be helpful to complete a task or solve a problem

Decomposition
Problems we encounter as part of learning or throughout our daily lives ultimately consist of a number
smaller problems that each can be addressed easily.
Decomposition therefore helps solving a complex problem by breaking it into small manageable parts where
each part is more straightforward and easier to solve. Putting solutions of smaller parts together then provides
the solution to the big problem.

Big Problem

First part of
Second part of
problem (smaller
(smaller poblem)
problem)

Smaller Problem Smaller Problem Smaller Problelm Smaller Problem

Smaller Problem Smaller Problem Smaller Problem Smaller Problem Smaller Problem Smaller Problem

This process of breaking down problems enables us to analyse the different aspects of each problem,
ground our thinking, and guide ourselves to an end point or towards the solution of the bigger problem.

For example, consider the following problem:

You are meeting up with a group of friends this afternoon. All of you like different things, but you have
been put in charge of finding something to do that will keep most of your friends happy.

You could break down the problem considering time, money, weather, the group’s individual interests and
asking questions:

58
Problem:
What can we do
this afternoon?

Considerations

Time Money Weather Interests Transport

What are the


How much time do Do we have any What would the How will we get
group's common
we have? money to spend? weather look like? there?
interest

What did we
What can we do in What can we do Outside? or
previously do that
the time we have? that is for free Inhouse?
was succesful?

After considering all the answers to the smaller problems, it would be easier to come up with a plan.

Guided Activity 4.2.3


If you need to find and insert a picture of a computer into a word processing document, you will break
down the task into several smaller tasks, that can be completed individually.
The first step is to break the problem into two Identify the important details needed
distinct sub-tasks: to solve this problem (abstraction)
• Find a picture of a computer on the
Break the problem down into smaller
Internet; and
logical steps (decomposition)
• Insert the picture into the word processing
document.
Now, break down each of the above tasks into even smaller tasks:
• Find a picture of a computer on the Internet
o Open the browser, e.g. Microsoft Edge
o Open the search engine, e.g. Google and type the word ‘computer’ into the search bar
o Click on images
o Find a picture of a computer and download it onto your computer
• Insert the picture into the word processing document
o Open the word processing program, e.g. MS Word
o Find the Insert tab
o Find the command for inserting illustrations and click pictures
o Navigate to the place (downloads folder) where the picture was downloaded.
o Find and insert the picture
One could possibly divide some of the
above sub-tasks into even smaller tasks.
When you need to complete a task and you
feel overwhelmed, it is important that you break it down into sub-tasks. Then solve each sub-task.
Decomposition is also an especially important skill with regards to coding (programming).

59
Activity 4.2.4
1. Watch the following video on decomposition to enhance your understanding of decomposition and
answer the questions that follow:
https://youtu.be/eWSI8xK2upM
a. Describe Decomposition in your own words
b. Provide an everyday example to illustrate decomposition
c. Explain how decomposition can be helpful to complete a task or solve a problem
2. Use decomposition and break the following tasks into smaller, manageable sub-tasks
a. Draw money from the ATM
b. Send a WhatsApp message to a friend

60
UNIT 4.3 REPRESENTATION OF ALGORITHMS
As algorithms are an especially important aspect of computer programming, in this unit we will look at
different ways to represent an algorithm.

Representing an algorithm
An algorithm is often expressed at a high level using natural language (plain English language) or a flow chart
You are going to look at representing an algorithm using natural language and flow charts.

Flowcharts
A flowchart is a diagram representing instructions using shapes such as rectangles, parallelograms, diamonds
as well as the ordering and flow of instructions using a line with an arrow.

Symbol Action Description/Function


Begin / End An oval represents the beginning or the
(Start / Stop) end of instructions

Input / Output A parallelogram represents the input


(Read / Write) (data) or output (results) of the solution

Processing A rectangle represents a process, e.g.


calculation

Decision A diamond represents a decision based


on a condition
(Allows for taking different paths)
Flow of instructions An arrow is a connector between the
(Next instruction) symbols that shows the relationship
between the symbols as well as the
flow and ordering of the instructions

You have learned that an algorithm has a beginning, middle and end. This can be illustrated as follows:

61
Example
Consider the algorithm for drawing a square:

Algorithm Description Example of Representation


Representation
Instructions Step-by-step instructions/ Linear Considering pattern
(Natural actions written in a natural
Language) language such as English to
describe how a task needs
to be completed or a
problem is to be solved

Flowchart A flowchart is a diagram Linear Considering pattern


representing instructions
using shapes such as
rectangles, parallelograms
and diamonds, and the
ordering and flow of
instructions using a line
with an arrow

Eventually, an algorithm representation is transcribed into computer language, such as Scratch code that
the computer can understand and execute.

From the examples, we see that an algorithm can


• Consist of a sequence of steps or
instructions
• Have conditions that require decisions –
Questions that are asked – e.g. which road
should I take? Have the instructions been
repeated 4 times? Step 1 Step 4? Repeat
Step 2 or Step 6
• Have steps repeated – e.g. turn left 90
Step 3 Step 5?
degrees and draw a 3 cm line

62
Guided Activity 4.3.1
1. We can develop a high-level algorithm for creating passwords by following the steps below:
a. Take the first two letters of the app or website, e.g. Fa for Facebook
b. Take the last two letters of the app or website, e.g. ok for Facebook
c. Join the first two and the last two letters, e.g. Faok
d. Reverse the order of the joined letters, e.g. koaF
e. Count the number of letters in the app or website name, e.g. Facebook = 8 letters, then find the
symbol on the keyboard above that number (*) and add the symbol to the end of the reversed
phrase, e.g. koaF*
You can represent the instructions above using a
flowchart:
Input

Process/Sequence of Steps

Output

With this algorithm you can create a unique password for any site without having to remember many
passwords
f. Follow the given flowchart and create a password for Gmail.
g. Develop your own algorithm for creating passwords, then represent your algorithm using a flow
chart.

63
2. You want to write a Scratch programme to illustrate a dog running
continuously in in a circle
i. Move 10 steps Repeat forever
ii. Turn 15 degrees right

Steps repeated
(loop)

The above is an example of an infinite loop – it does not


stop! (there is no condition to satisfy for it to stop)
You need to stop the programme to stop the loop from
executing.

3. You want to explain to your younger brother how to determine whether you pass a test. You wrote
down the following instructions:
iii. Get the test mark
iv. Get the test total
v. Calculate the percentage
vi. If percentage is more than 30, you have passed, else you have failed
You can represent the above instructions using a flowchart:

Input

Process

Decision based on Condition:


If you have 30% or more, you
pass, else you fail

Output

64
Activity 4.3.2
Watch the following video and answer the questions that follow: https://youtu.be/Yq1OPs5hCt0
1. Which of the following statements describe a flowchart? Write done all that apply.
a. A flowchart is a diagram showing a step-by-step solution to complete a task or solve a problem.
b. A flowchart is visual representation of the sequence of steps and decisions needed to perform a
task or solve a problem.
c. A flowchart illustrates an algorithm to aid the visualisation of the instructions.
2. Which of the following statements are correct about flowcharts? Write down all that apply.
a. They never contain cycles (repetition): that is, you can never get to the same instruction twice by
following the “next instruction” arrow.
b. A parallelogram indicates a special type of instruction, called input/output instruction
c. There can only be ONE directed arrow coming out of an instruction
d. If there is an arrow from Instruction1 to Instruction2, then Instruction2 must be performed after
Instruction1
3. The following flowchart symbol indicates decision making:
a.
b.
c.
d.

4. What is the purpose of the following flowchart?

65
5. The flow chart on the right is meant to show the steps for stop working on a
computer and shutting it down. Complete the flowchart by adding the
following instructions in the correct blocks.
• Find the power button
• Close all other programs
• Save your work
• Close the program you are currently working in.
• Click on shut down

6. The following flowchart must determine if a person is at least a teenager or not (13 years or older).
Complete the following flowchart using
the instructions below:
• Display ‘At least a teenager’
• Display ‘Not a teenager yet’
• Age >= 13?

7. Complete the flowchart that represents the instructions for safely crossing the
road by adding the following instruction in the correct blocks.
• Cross the road carefully
• Look left and right
• Stop at the kerb
• Is the road clear both ways?

66
8. Draw a flowchart for the following problem:
Two kids are rolling a dice to see who must start the game. The one with the highest number must
start the game. If they get the same numbers, both need to roll again.
9. Draw a flowchart for the following problem:
An employee's weekly pay depends on the rate of pay and the number of hours worked per week.
Employees’ working hours per week are 40 hours. An employee who works more than 40 hours is paid
1.5 times the normal pay rate for all hours worked over 40. Normal pay is R50 per hour. A program is
required to calculate and output the weekly pay for any employee.
First, break down (decompose) the overall problem into several smaller, more easily to be solved
problems by focusing on the important, relevant details (abstraction):
1. Find out what the normal pay rate is
2. Find out what the overtime rate is
3. Find out how many hours are worked
4. Find out how many of those hours are to be paid at the normal rate
5. Find out how many, if any, of those hours are to be paid at the overtime rate
6. Work out the pay for the normal hours
7. Work out the pay for the overtime hours
8. Total the pay for normal and overtime hours
9. Output the result

Now draw a flowchart for the problem.

10. Watch the following video and complete the following activity:
https://youtu.be/II7tuwpifIM

• In a group of 2-3, write instructions for a 1-minute dance sequence


• Swap your dance instructions with another group and see if you can correctly carry out each
other’s moves.
• If your instructions are not specific enough, revise them and test it again.
• Finally, represent your algorithm using a flowchart

67
UNIT 4.4 CONSOLIDATION
This unit will consolidate what you have learned about computational thinking when solving problems as
computational thinking is part of the problem-solving process that ends with writing a program.

Putting it all together


In terms of programming, computational thinking is an approach to solving problems using concepts and
ideas from computer science and expressing solutions to those problems so that they can be executed by a
computer. Computational thinking involves:
• abstraction (focusing on the big picture are the important aspects)
• breaking down a problem in smaller parts (decomposition),
• looking for patterns (pattern recognition and generalisation),
• developing a step-by-step solution (algorithm).

When you use computational thinking to solve a problem, what you are really doing is developing an
algorithm – a step-by-step series of instructions. Whether it is a small task like scheduling meetings, or a
large task like mapping the planet, the ability to develop and describe algorithms is crucial to the problem-
solving process based on computational thinking.

Not all tasks or problems may require all four pillars to solve, e.g. a very
simple task or problem may not require to be broken into smaller
problems

In Grade 8, you were given the following guidelines for developing an algorithm:
• Understand the problem
o Read the problem statement carefully to understand what the problem is that you need to
solve
• Analyse the problem
o What should the output (result) be?
o What are the inputs to get to the output?
o What processing (if any) needs to be done to get to the output?
o Can the problem be broken down into smaller problems? (Decomposition)
o Are there any patterns? (Pattern recognition)
• Develop a high-level algorithm A high-level algorithm includes only the
o Determine the main steps, main steps or instructions of the solution
ignoring the detail and leaves the details until later
(Abstraction)
• Refine the algorithm by decomposing steps
(breaking steps down into more smaller tasks) or Refinement is a process for
instructions and adding more detail developing a clear,
unambiguous and detailed
• Test the algorithm – follow the instructions to algorithm by breaking the high-
see if it delivers the desired output level steps down, finding
o Does the solution or output make sense? patterns and gradually adding
o Is the sequence logical? detail to a high-level algorithm
o Is the algorithm efficient?
o Are all parts of the problem or task covered?
o Are some instructions or tasks repeated unnecessarily?
• Evaluate the algorithm and update or correct the algorithm if necessary.

68
Guided Activity 4.4.1
The stationery shop at school is marketing a specific product and encourages learners to write a review on
the product and send their review via email. The school has received many emails containing reviews on
the product and the principal wants to analyse these to see how many learners seem to be happy with the
product and you need to help.
To be able to do so, you need to determine how many times the word ‘happy’ or any synonym/word that
indicates learner satisfaction occur in all the mails.
The synonyms that you will be looking for are: excellent, satisfied, good, pleased, delighted, superb, great,
nice.
To be able to find a solution, the following questions will help:
• What are the main aspects to focus on?
• What are the main sub-problems that you need to solve in solving the overall problem?
• What patterns can you see in the solution, i.e., what steps/processes need to be repeated? Can the
patterns be generalised?
• What is the algorithm that you would use to solve this problem?
You should only focus on the general problem of counting the number of occurrences of the word and its
synonyms in a stack of email documents.
Let us see how you could use your computational thinking skills to accomplish the above task.
Steps Computational Thinking
First, focus on the main aspect of the problem: Abstraction – Focusing on one
• Count the number of occurrences of the word and its identifying and counting the words,
synonyms in a stack of email documents ignoring other detail/information in the
o Compare words in all emails to list of words mail
o Highlight words in all emails that occur on list
o Count all highlighted words
Decompose the problem – make the
Secondly, use one email and find the words
problem smaller
• Using one email, first look for the word ‘happy’ and Further decompose the problem –one
highlight the word if it occurs word at a time in each email
• Now look for the next word (synonym) and
highlight the word if it occurs
• Repeat the above step until you have checked Pattern recognition – the same process
and highlighted all the words on the list is repeated for all the words in the list
• When you have worked through the list of words and
highlighted all the words listed in the one email, count
the number of highlighted words in the mail
• Add the number of highlighted words in the mail to
the top of the mail and enter the number into a
spreadsheet
Pattern recognition – the same process
• Thirdly, repeat the pattern/process for all the emails is repeated for all the emails to look for
all the words in the remaining emails
Algorithm – You have developed an
• Fourthly, add the numbers in the spreadsheet.
algorithm using abstraction,
Your problem is solved!
decomposition and pattern recognition

69
Guided Activity 4.4.2
Use computational thinking to develop instructions (algorithm) for drawing the following pattern:

a. Focus on the main steps – identify the main steps (develop a high-level algorithm) – abstraction
The ball moves forward, up, and down

b. Refine – break the main steps down into small, logical steps (decomposition)
Movement:
Forward, up, forward, down forward, up, forward down, forward, up forward down, etc.
FW (15 steps) up (15 steps) FW (30 steps), down (15 steps), Forward 30 steps, etc.
One could look at 30 steps as 15 steps + 15 steps to enhance the pattern
Movement:
FW 15, UP 15, FW 15, FW 15, DOWN 15, FW 15, FW 15, UP 15, FW 15, FW 15, DOWN 15, FW 15,
FW 15, UP 15, FW 15, FW 15, DOWN 15, FW 15……. FW 15, UP 15, FW 15, FW 15, DOWN 15, FW 15

c. Find the pattern

FW 15, UP 15, FW 15, FW 15, DOWN 15, FW 15 – repeated 6x


To go up – turn left; to move turn right
To go down – turn right; to move, turn left

d. Use the steps and pattern to develop the algorithm that solves the problem
Face east, FW 15, turn left, FW 15, turn right FW 15, FW 15, turn right, forward 15, turn left FW 15
– repeated 6x
East = direction 90°; UP = direction 0°; DOWN = direction 180°

e. Code the algorithm (convert to Scratch code)


Repeat 6
Direction 90°
Move 15 steps
Direction 0°
Move 15 steps
Direction 90°
Move 15 Steps
Move 15 Steps
Direction 180°
Move 15 Steps
Direction 90°
Move 15 steps

f. Test and debug the algorithm


o Run the Scratch program
o If the above pattern is not displayed, troubleshoot and fix
If the above pattern is displayed – WELL DONE!

70
Activity 4.4.3
1. You need to sort a deck of shuffled play cards so that all the types ( ) are together and the
card from each type are sequenced according to their value, in a descending order (the card with the
highest value (A) is on top of each type’s stack).

Use your computational thinking skills (as in Guided Activity 4.4.1) to solve the problem by writing
down all the steps
Answer the following questions to help you solve the problem:
o What are the main aspects of the task (abstraction)?
o How will you decompose the problem?
o Are there any patterns?
2. Watch the following video and answer the questions that follow:
https://youtu.be/_TWsmF8l418
a. Computational thinking is the process of approaching a problem in a systematic manner and
creating and expressing a solution such that it can be carried out by a computer.
i. True
ii. False
b. Which one of the following describes decomposition?
i. Ignoring unnecessary details in a problem
ii. Writing down a few examples to see if a pattern emerges
iii. Breaking down a complex problem or system into smaller, more manageable parts
iv. Prioritising tasks within a problem and determining the order in which to perform them
c. Which one of the following describes abstraction?
i. Breaking down a complex problem or system into smaller, more manageable parts
ii. Looking for similarities among and within problems
iii. Focusing on the important information only, ignoring irrelevant detail
iv. An ordered list of instructions to the problem or complete a task.
d. Looking for repeated steps within a problem is called
i. Abstraction
ii. Decomposition
iii. Pattern Recognition
iv. Algorithm
e. You have a list of grocery items and want to spend as little time as possible in the store picking
them all up. Which of the following descriptions is the best algorithm to do this?

71
i. Visit all aisles in the store. If there is an item on the list that is in that aisle, then put it in the
shopping chart.
ii. Determine which aisle each item is in. Cluster the items on the list that are in the same
aisle. Go through these aisles in order and place the items in the shopping chart.
iii. For each item on the list, go to the aisle it is in and put the item in the shopping chart.
f. Abstraction can be described as the gathering of the general characteristics one needs and the
filtering out of the details and characteristics that one does not need
i. True
ii. False
g. Breaking down a complex problem into smaller, more specific sub-problems is called
i. Abstraction
ii. Decomposition
iii. Pattern Recognition
iv. Algorithm
h. When writing down the steps for baking a cake, you decide that some information is less relevant,
for example, you do not need to know which brand of flour you need to use or whether to use
fresh milk or long-life milk. In computational thinking, this process of ignoring less relevant
information is known as
i. Abstraction
ii. Decomposition
iii. Pattern Recognition
iv. Algorithm
i. Which of the following could be an approach to decomposition? Write down all that apply.
i. Start with a smaller or simplified version of the problem and build up to the original
problem
ii. Looking at the big picture, ignoring the detail.
iii. Figuring out what main steps are needed to solve the problem and writing them down.
iv. Test out a few examples to see if a pattern emerges
j. Which of the following are important when designing and algorithm? Write down all that apply.
i. Each instruction must be clear and unambiguous
ii. The order of the instructions
iii. The time at which an instruction must be done
iv. Each instruction must represent a single task
k. Looking for similarities and differences is an approach to pattern recognition
i. True
ii. False
3. Number guessing game
You think of a number between from 1 – 10. Your classmate must guess which number you are thinking

72
of and tell you. You may only respond with ‘lower’ (if your classmate must guess a lower number) or
‘higher’ (if your classmate must guess a higher number).
Your classmate keeps guessing and you keep responding until the number guessed is correct.
a. Develop an algorithm for the number guessing game
b. Create a flowchart to represent the algorithm
4. Study the following Scratch code
a. Work through the first Scratch algorithm in the table and provide the output.
b. Explain what the first block of code does.
First block Second block

c. Work through the second Scratch algorithm in the table and provide the output.
d. Explain what the second block of code does.
e. Explain the the difference between the two code blocks
5. Study the flowchart on the right and answer the questions that follow:
a. What will the be displayed?
b. Explain in your own words what the purpose of the algorithm is.
c. How many times is the instruction
Number  Number +1
executed?
d. If the instruction
Number  0
is changed to
Number  1
a. what will then be displayed?
b. how many times will the loop then be executed?

73
6. Let us look at the code from Activity 4.1.2 again. We saw that
we could draw different shapes by only changing the number of
sides
Open the program A4_1_2 and improve the algorithm/solution
so that the program asks the user how many sides the shape they
want to draw has, then draw the shape based on the number of
sides user provided.

7. During holidays, you will be looking after people’s houses that go away. Which of the following information
do you require for the task. Write down all required.
a. Physical address of the property
b. Square footage of the house
c. The dates that they depart and return
d. The number of family members
e. The colour of the car they are driving
f. Whether there are pets to feed
g. Whether there are plants to water
h. Mobile number of the owner
i. Which places they will be visiting while they are away

8. Read the following story and answer the question that follows:

74
From: 2020 Beaver Computing Challenge (Grade 7 & 8), University of Waterloo, The Center for Education in
Mathematics and Computing 2020BCCContest7_8.pdf (uwaterloo.ca)

The term algorithm comes


from 9th century Persian
mathematician and
geographer Muhammad ibn
Musa al-Khwarizmi. The term
algorithm was derived from the
Latinization of his name to
"Algoirtmi". Al-Khwarizmi
developed a systematic
approach to solving linear and
quadratic equations, which
was then termed algebra.

75
CHAPTER 5: DIGITAL CITIZENSHIP
Chapter Overview

Term 2 Understand and implement safety measures


when online.
Unit 5.1
Ethical, social and safety awareness when Displaying respect towards others during
online TERM 1 Internet activities and realise that what you
do or place online is connected to your
name forever.

Unit 5.2 Understand copyright and plagiarism.


Copyright, plagiarism, When using a person's intellectual property,
public domain and know how to acknowledge him/her.
referencing sources TERM 2 Be able to explain what a public domain is.

Chapter 5 Unit 5.3 Understand cybercrime and the protection


Digital Citizenship Understand cybercrime, protection and legal and legal consequences stipulated in
consequences legislation
TERM 3

Learn about Digital Entrepreneurship.


Unit 5.4 What it takes to be a Digital Entrepreneur and
Digital Entrepreneurship the steps that need to be taken to get your
TERM 3 business up and running.

Unit 5.5
Consolidation
TERM 4

Prior Knowledge

You should have a basic understanding of the WWW.


&
How to use the Internet to gain information in a safe and
secure manner.

At the end of the chapter you should be able to:

• Distinguish between online harassment, cyber stalking and cyber bullying, how to prevent it and how to deal with it.
• Discuss differences and similarities between online and offline identity.
• Discuss online and social media safety measures.
• Realise that the digital world is permanent.
• Practice good manners and netiquette when online.
• Discuss how to behave and manage oneself ethically when online and when using digital/social media.
• Understand what copyright and plagiarism is.
• Explain what the public domain is.
• Reference sources and draft a bibliography.
• Understand cybercrime – protection against cybercrime and legal consequences if someone is convicted of such.
• Basic knowledge of some legislation with regards to cybercrime – rights and obligations.
• Have the basic knowledge of what it takes to be a Digital Entrepreneur and the steps that need to be taken to get your
business up and running.

UNIT 5.1: ETHICAL, SOCIAL AND SAFETY AWARENESS WHEN ONLINE

76
In this unit, you will learn about online safety measures and how to implement them to protect yourself and fellow
Internet users. You will also learn how to show online respect towards others and realise that what you do or place
online is connected to your name forever.

Guided Activity 5.1.1


Be kind to others

• Print, cut and fold the following Kindness Catcher

• Have some fun with some of you classmates.

Online Abuse
In grade 8 you learned that the Internet is a global network in which billions of computers and other electronic
devices are connected. This global network, makes it possible for us to communicate with people around the
world.

Abuse is defined as any action that deliberately harms or distresses another person. Someone who intentionally
harms another in any way is committing abuse.

Online abuse includes using social media, games or other forums to make:

• abusive, degrading or detestable comments about a person

77
Image by huffingtonpost
• threats of any form of violence to a person

• repeated or unwanted requests to a person

This chapter will provide you with more information so you can identify abusive behaviour online and do
something about it.

If something is illegal, unfair or unacceptable face-to-face, then it doesn’t make it acceptable to behave that way
online. We have to adhere to the same standards of behaviour when we are online as aposed to when we are in
face-to-face encounters.

Online harassment, cyber stalking and cyber bullying are only three forms of Online Abuse that we will be looking
at in this chapter.

Online harassment

Online harassment is any unwanted behaviour that makes a person feel uncomfortable, humiliated, or mentally
distressed when connected to the Internet. Social media sites are the most common place people encounter
harassment online, but harassment often occurs in other online locations too which may involve threatening or
harassing emails, instant messages, or posting information online. It targets a specific person either by directly
contacting them or by spreading their personal information, causing them distress, fear, or anger.

Cyberstalking

Cyberstalking is persistent unwanted communication from another person that you either know or a stranger.

These perpetrators have many different motives, including those who feel mistreated by their target, ex-partners,
those with inappropriate sexual reasons, or those who just derive pleasure from terrifying others. They can use
your social media profile to snoop around to find out your every movement, who you are in contact with and your
present or future plans. As cyber stalkers become more determined, they intrude on more aspects of your online
presence, sometimes including hacking or taking over your social media accounts.

Cyberbullying

Cyberbullying is bullying where perpetrators use digital technologies for their wrongdoing. It can take place on
social media, messaging platforms, gaming platforms etc. It is repeated behaviour, aimed at scaring, upsetting or
shaming those who are targeted.

• Examples include: spreading lies about a person or posting embarrassing photos of someone on social
media

• sending hurtful messages or threats to another person via messaging platforms

• impersonating somebody and sending appalling messages to others on their behalf.

Online bullying can be particularly damaging and upsetting because it's usually anonymous or hard to trace,
although cyberbullying and face-to-face bullying often happen alongside each other and the bully is actually known
to the victim. It's also hard to control, and the person being victimized has no idea how many people have seen
the messages or posts. People can be tortured constantly whenever they check their device or computer.

Online bullying and harassment can be easier to commit than other acts of bullying because the bully doesn't have
to confront his or her target in person.

All friends joke around with each other, but sometimes it’s hard to tell if someone is just having fun or trying to
hurt you, especially online. Sometimes they’ll laugh it off with a “just kidding,” or “don’t take it so seriously.”

78
But if you feel hurt or think others are laughing at you instead of with you, then the joke has gone too far. If it
continues even after you’ve asked the person to stop and you are still feeling upset about it, then this could be
bullying.

And when the bullying takes place online, it can result in unwanted attention from a wide range of people including
strangers. Wherever it may happen, if you are not happy about it, you should not have to stand for it.

How to prevent Online Abuse

There are ways to help prevent online abuse. These methods will not necessarily stop abuse from taking place
completely, but it should make it more complicated for the wrongdoers to initiate any form of abuse campaign
against you.

Review your social media and search engine privacy and security settings to limit what other people can see
about you and what you post. This will stop people gaining access to your personal information and anything
they could use as “ammunition” for their online abuse.

You can also ensure everybody you have on your social media accounts are friends, family or people that you
trust. If someone requests to be your friend online and you don’t recognize them and they don’t have a mutual
connection to you, consider that they might have another agenda.

Review what online information exists about you and keep it to a minimum. Limit the personal and financial
information you share on or offline – keep personal info personal.

Turn the geolocation function of on your cell phone and disable location tagging in your social media apps.

Limit contact with an abusive account and limit exposure to abusive content.

Make use of the features on Social Media platforms like blocking, muting, and restricting which can help you
protect yourself from unauthorised, inappropriate, or harmful behaviour.

Keep your accounts secure by changing your passwords regularly and make use of strong passwords that is
difficult to guess and don’t share it with anyone.

Ensure that your digital devices have up-to-date internet security software installed and turned on.

Ensure your wireless hub/router has the security function turned on.

Do not send or receive any private information when using public Wi-Fi.

How to deal with Online Abuse when it happens.

If you think you’re being a victim of any form of Online Abuse, the first step is to seek help from someone you
trust such as your parents, a close family member or any other trusted adult, for example your favourite teacher
at school.

If you are not comfortable talking to someone you know, there are several Children Helpline Centres that you
can contact where you can talk to a professional counsellor.

If the Online Abuse is happening on a social platform, consider blocking the perpetrator and formally reporting
their behaviour on the platform itself. Social media companies are obligated to keep their users safe.

It is important to collect evidence of the actual abuse – text messages and screen shots of social media posts – to
show what’s been going on.

79
For the abuse to stop, it needs to be identified and reporting it is key. It can also help to show the perpetrator
that their behaviour is unacceptable.

If someone sends you threatening, abusive or offensive messages online or via a social networking site, they
could be committing a criminal offence. The most relevant offences are Online Harassment and Malicious
Communications. For a harassment offence to be committed, there must have been a clear 'course of conduct'.
That is, two or more related occurrences. Messages don’t necessarily have to be violent in nature, but would
need to have caused some anxiety or distress. If there has only been a single communication, it’s unlikely it
would qualify as harassment, but could be considered as malicious communication. For such an offence to be
committed, a message must be sent to another person, or sent via a public communications network, that is
indecent, grossly offensive, obscene, threatening or menacing.

If you feel in immediate danger, then you should contact the police immediately.

SAPS
[email protected]
SAPS Crime Stop: 0860 010 111

Guided Activity 5.1.2


Online harassment, Cyberstalking, Cyberbullying

Are you aware of someone that is a victim, maybe it is you? Do you know someone who is making him/herself
guilty of the above-mentioned crimes? It is possible that the person isn’t aware that it is a crime, or it might be
unintentional. Advice given is to tell someone – parent, teacher, or any other adult that you trust. Although it
sounds easy, this can be a very difficult task.

Let’s look at the following poster and have a group discussion on ways to tell someone to be able to help that
person who is trapped in such an unpleasant situation.

80
Online Identity
Online Identity is a social identity that an Internet user creates
in online communities and websites. It can also be considered
as an actively created presentation of oneself. Although some
people choose to use their real names online, some Internet
users prefer to stay anonymous, identifying themselves by
means of a fictitious name, which reveal varying amounts of
personally identifiable information. An online identity may even be determined by a user’s relationship to a
certain social group they are a part of online.

81
Differences and similarities between Online Identity and Offline Identity

Who is the real you?

Online Identity is a social identity that an Internet user creates in online


communities and websites and Offline Identity when you are not on the
Internet.

Scrolling through your friends’ posts, taking in all the smiling faces, the
beautiful pictures of exotic holidays, meals that you would like to climb into
the screen and start to indulge, and of course - What is with all the duck lips?

Is this fiction or reality?

Many people today find themselves creating two completely different identities:
I act,
one for offline and one for online. In a very competitive world where it is most of
therefore the time a challenge to make your mark, we want to put our best foot forward. It is
I am
like an upscale art gallery, we choose what pictures to post, what moments to
capture, what statuses to share. We edit, filter, crop, and why not? There’s nothing
wrong with this. As long as we realise that what most people post online is only a
“highlight reel,” meaning everyone shares their best moments in life. It must never
be used as a measuring stick when comparing ourselves to others.

But now that the internet is gaining importance in our lives and we are spending
more and more time online, we start to give up secrecy and also the desire to hide
our true identity when we spend time on the Internet. Online activities are no
longer that separable from our real lives, but is starting to be an integral part of it.

Activity 5.1.3
Online Identity and Offline Identity

This is a written activity.

Differences and similarities between YOUR Online Identity and Offline Identity. Think about your own
identity and write a few differences and similarities down. Try to write at least a total of ten differences and
similarities.

Social Media Safety


In grade 8 we looked at Internet Safety Rules and what not to do Online. This year we are focussing on keeping
yourself safe while using social media platforms.

Safety measures being online and being part of the social media pool, can
be viewed as crossing a busy street.

Although it seems very easy, both are complex skills that requires a lot
attention, visual perception, and decision-making skills. One cannot just
run across the street without taking the necessary safety measures. Yes, it
might be that you get safely on the other side, but the worst might also
happen. We must have a healthy sense of danger around being online so we can stay safe.

Online social media platforms attract a very large percentage of users and is an enormous industry. Being part of
a group is a fundamental part of being human.

82
"No man (person) is an island " is a very well-known
phrase from a book in 1624 under the title of ‘Devotions
upon Emergent Occasions’ by John Donne.

The psychological term - the need to belong, is a human emotional need to associate with and be accepted as a
member of a group. This may include the need to belong to a group of friends at school, to be part of the soccer
team, to be part of a religious group, or even being part of an online social group.

Sense of belonging is the psychological feeling of


belonging or connectedness to a social, spatial, cultural,
professional, or other type of group or a community
(Hurtado & Carter, 1997)

Safety measures while being online and a member of a social media group

The first important safety measure is to make sure the group (content) is suitable for your age. Being part of any
group, most of the time requires that you are a certain age to be acknowledged as a member. The same with
social media groups - most social networking sites have an age requirement to allow users to be a member of
that specific group. The reason is to protect you (as well as the other users of that group).

Other safety measures include:

• Never approve friend requests or add people that you don’t know in real life.
• Be sure you never meet anyone in person that you have only met online.
• Be careful about what you share. Social media sites give you the option to share your details with your
connections – be very careful about what you reveal. For example, sharing your date of birth, home
address or phone number is not a great idea as it can pose a physical or online security risk.
• Privatize your social life. Most social media apps have effective privacy settings that let you change your
personal profile to private. By doing this, you can make sure that only your friends or followers will be
able to see your posts or interact with you.
• Be especially careful with posts and pictures. Avoid posting strong opinions and insulting remarks
against a public figure or community if you want to stay out of trouble. If you are
a selfie-lover, stick to pictures that are decent enough to share publicly. Be sure
to think twice before posting anything on social media because you wouldn’t
want attention for the wrong reasons. There are plenty of people with malicious
intentions out there, making it vital to understand the value of privacy.
• Beware of users who set up a fake profile and pose as someone else and try to
engage contact with you. This form of cyberstalking is called Catfishing. These
imposters usually include only a limited number of photographs on their pages that look staged, asking
for intimate photos or money.
• Block connections who make you feel uncomfortable. Fortunately, you have the option to protect
yourself from harassment, stalking or unwanted contacts on social media. When you join a social
network, be sure to check the blocking option in case you need to block a member you do not want to
interact with. Once you block a connection, you can rest assured that they will not be able to access
your account or get in touch with you through that specific platform.
• Avoid questionnaires – giveaways and contests, or online quizzes, can be very
tempting. These can also be phishing scams that will try to trick you into
providing them with your personal information or to allow hackers to try to
infect your computer with malware.

83
• Keep your location a secret. Personalizing social media status updates with a live location taken from a
mobile device’s GPS is NOT safe online practice. DO NOT tag posts or photos with a location, you do not
want your precise whereabouts broadcast to the world.
• Watch out for apps within sites. Some of these apps can share or post information by default without
you knowing about it.
• Protect your accounts with a strong password. Security of social network accounts is as important as
that for your computer or any other online account. You need a strong password that can prevent
hackers from getting access to your account. To be on the safe side, a password length of 12 characters
or more, and includes numbers, letters and special characters, should be used. Avoid practices like using
your name, date of birth or any other common data as a password. Changing your password every few
months also keeps your account safe to a considerable extent.
Another good idea is to make use of a Password Manager.
is an advanced tool that helps individuals securely store
and manage all their login credentials. This tool is
commonly used to generate strong, unique passwords for
web applications. Once generated, these passwords are
put in a centralized online vault, and encrypted with one
master password. Users only need to remember one
password to access their services.

Activity 5.1.4
Social Media Safety

This is a written activity.

While being online, which five safety measures do you think is the most important when it comes to your
whereabouts while being online and a member of a social media group.

Awareness of digital footprint


What is a digital footprint?

Have you ever walked over an area covered in sand? If you look back, you will see
your footprints that you leave behind. These footprints will be visible until something
like water washes it away.

The same is with your digital footprint, but there is that difference that there is no
‘digital water’ to wash it away.

Activity 5.1.5
Digital Footprint - Class Discussion

Have you ever been surprised at how a website knew certain things about you?

While being online:

• Do you see ads related to what you’re interested in?

• Are the ads that you see different than the ads your friends see?

• Do websites sometimes know your location even when you don’t tell them?

84
What is an information footprint?
Note: The terms “information footprint” and “digital footprint” are generally used
interchangeably. Either term can refer either to the individual “footprints” or bits of
information someone leaves behind as they go through life, or to the overall “footprint”
made up of all of the information there is about someone online. Generally, we use
“information footprint” to refer to the overall sum of information about someone.

Every time you post something online, share content, or even when a website collects your information through
cookies installed on your device, you are creating a digital trail. This includes your IP address, your login details,
and other personal information that you reveal online. Information that is posted about you also gets added to
your data trail.

Your digital footprint can say quite a lot about you and your online activities.

It is a good idea to have a positive digital footprint. This information is your digital identity, and it could show up
when someone searches for your name online.

Your online identity can influence different aspects of your life. For example, schools, universities, employers,
etc. could use your digital footprint as a basis for character assessment.

It is crucial to realise that your digital footprint is permanent.

Activity 5.1.6
Minimise your Digital Footprint through the Application Settings

Open the following webpage and familiarise yourself with the different settings discussed:

• Turning Off Location Services


• Turning Off Photo Tagging
• Changing Basic Privacy Settings: By Site/App
• Changing Basic Privacy Settings: By Device
• Disabling Tracking Identifiers
• Stripping EXIF Data from Photos
• Deleting or Deactivating Accounts

Step Up Your Settings: Privacy Settings How-To’s - https://teachingprivacy.org/prevention/

If you have your own cell phone, check the phone/app settings and apply the necessary changes to be in a
protected state while being online.

Netiquette
Discuss good manners and netiquette for the digital world.

Even from before you can remember, you have been taught about good manners. Good manners are the
treatment of other people with courtesy and politeness, and showing correct public behaviour. We must treat
others like we would like to be treated.

85
The French word étiquette means "ticket" or "label
attached to something for identification."
In today’s terms, how we identify someone in terms of
his/her general behaviour.

Even when we are online in the digital world, the same rule applies. Behaviour while online that is appropriate
and courteous to other Internet users.

(Inter)Net + Etiquette = Netiquette

Here are a few pointers to keep in mind while being online communicating with others:

The most important rule - if you wouldn’t want it done to you, don’t do it to someone else.

Remember that you are dealing with real people. Humanity towards others is key (Ubuntu). Be respectful.
Everyone has different feelings and opinions and it is important to respect this online. You may wish to comment
on something someone has shared but always remember that behind every account is a real person. If you
wouldn’t say it to someone’s face, the internet is not the place to say it either.

Ubuntu means "I am, because you are". The word ubuntu (umuntu) is
part of the IsiZulu phrase "Umuntu ngumuntu ngabantu", which
literally means that a person is a person through other people.

Be aware of how your comments might be read. Strong language, capital letters, and exclamation marks can be
easily misinterpreted online. In the real world, we have the addition of body language, tone of voice and facial
expressions to help us understand what someone has said. We can also re-phrase what we say if we’re
misunderstood in the offline world. Always keep in mind that if you were to receive this comment how would
you have felt?

Be careful with humour and sarcasm. It’s always great to share jokes with others and it
is important to be yourself online and let your personality shine through. However, not
everything is always clear online and sometimes people might not realise you are
joking. Often people rely on emojis or text speak, e.g. ‘lol’, to help show they are not
being serious, but it isn’t guaranteed that other people will understand this. Reread
what you have written and think; will everyone get the joke?

Think about who can see what you have shared. Privacy settings are a simple way to
restrict who can see what you are sharing, but even with them in place nothing is ever
truly private online. Make sure you keep as much of your personal information off the internet as possible and
never share anything inappropriate or that may get you into trouble.

Adhere to the same standards online that you follow in real life. You need to behave the same way online that
you do in real life. You need to remember that you can get caught doing things you should not be doing online
just like you can in real life. You are still talking to a real person with feelings even though you can’t see them.

Know where you are in cyberspace. Always look around when you enter a new domain when surfing the web.
Get a sense of what the discussion group is about before you join it.

Take time to read the rules / standards. Most online forums, social networks, gaming networks, etc. have their
own code of conduct or guidelines for a user’s online behaviour. Every user has the right to have the same
positive experience online. The services you’re using use these guidelines to help guide and support you so that
you know what will and won’t be tolerated on their service. Before using a new account take a moment to read

86
the guidelines, so you know the appropriate rules of posting, behaviour and what to do if you need to report
something you see on this service.

Remember to check friend requests and group invites before accepting them. The internet is a great place to
share content and chat to friends but remember to review any new requests before accepting them. Check if
they are from someone you know or were expecting to receive a request from. If it isn’t from someone you
know or recognise you have the right to decline the request.

Respect other people’s time and bandwidth. Remember that others have other things to do. Express what you
need or are trying to say to in a concise manner. No one wants to waste time unnecessarily on for example an
email whose core message is only at the end of the email. That consumes time and effort, and is simply
annoying. Keep in mind that bandwidth isn’t free and not everyone has unlimited (uncapped) data to use.

Make yourself look good online. Remember to always check your spelling and grammar before posting. Always
know what you are talking about and make sense saying it. Be polite and pleasant to everyone. ‘Text language’
(LOL, NOYB, etc.) is NOT permitted in an academic setting.

Respect other people’s privacy. Most people do not like their names and email addresses (or any other private
information) being passed on to people they do not know themselves. This rule on the internet also applies to
uploading and sharing photos or videos that show other people. Before circulating such private files, be sure to
check with the people concerned before doing so. Do not simply forward information that has been sent to you
without first obtaining permission from the original sender. When sending private emails to multiple recipients,
use BCC (blind carbon copy) instead of CC (carbon copy). Never sign up for newsletters, forums, etc. with
someone else's name or email address.

Don’t abuse your power. On the internet, as in real life, some people have more power than others, for example
Class-Captain, experts in certain subjects or your school’s Head Girl. If you have more power than others, you do
not have the right to exploit this power. Rather share your knowledge with other in a respectful manner so that
they will benefit from what you know.

Be forgiving of other people’s mistakes. Do not point out mistakes to people online. Remember that you were
once the new kid on the block. You still need to have good manners even though you are online and cannot see
the person face to face. Be forgiving. The online world can be very different from the offline world so try to be
understanding of others when they struggle with online communication. If you see something online that you
don’t think is appropriate, you can use reporting tools to flag it to the site’s safety team. Remember that not
everyone will know these rules before posting or realise that they have upset someone else.

Activity 5.1.7
Netiquette

This is a written activity.

Formulate five Netiquette rules, in your own words, that you feel is of utmost importance to you.

Ethics online
Netiquette and how to behave and manage oneself ethically when online and when using digital/social media go
hand in hand. Be a responsible digital citizen. This means you must have the skills to take part in the online
community life in an ethical and respectful way.

Being a responsible digital citizenship also means:

87
behaving lawfully – for example, it’s a crime to hack, steal, illegally download or cause damage to other people’s
work, identity or property online

protecting your privacy and that of others

recognising your rights and responsibilities when using digital media

thinking about how your online activities affect yourself, other people you know, and the wider online
community.

The following aspects will guide you to take part in the online community life in an ethical and respectful way:

Be respectful – and expect respect

Respect for yourself and other people is important in all relationships, and it’s no different when you’re online.
Treat online friends with as much respect as face-to-face friends. Part of this is not creating or forwarding nasty
or humiliating emails, images or text messages about someone else.

Tell your parents or another trusted adult if you see someone being bullied or attacked online. Young people
often try to sort things out for themselves, but it’s good to get into the habit of telling a trusted adult if you are
worried about something that’s happening online. If the same thing happens to you, you should block or
unfriend these people who don’t treat you with respect. This sends the message that it’s not OK to mistreat or
bully someone online.

Protect your reputation

Make sure you understand the consequences of posting photos and videos, and uploading other personal
content. Once this content is online, it’s very hard to get rid of and can become part of your permanent online
reputation. Also, photos might be altered or shared without your permission.

As you would have your privacy protected, do the same for others

Share only as much personal information as necessary – for example, it’s not compulsory to enter your year of
birth, mobile number, email address or city on all online forms.

Never share personal information about someone else.

The POPI Act:


a comprehensive data protection law that regulates the processing of
personal information in South Africa. It's designed to protect people
from data breaches and cybercrime, and to prevent intrusive
marketing practices.

Keep privacy settings up to date on social media sites, so that your profile isn’t publicly available.

Watch your tone

It’s often hard to ‘read’ emotion in posts and emails, and jokes can easily be misinterpreted. ‘Stop, think, review’
before you send a message or post an online comment.

Ethics in Communication

Always use the correct language when we communicate to anyone through social media.

Yes, spelling and grammar do count!

88
Avoid Spreading race, pornography and violence issues

It would be wise if we do not spread information relates certain race or religion. Share useful information only to
avoid conflict and restrict yourselves from uploading sensitive media.

Check the news validity

Nowadays it is very common to find hoax news (Fake News) that for example cause people to become agitated;
to cause trouble in a group of people; to shock or alarm people; promotes or discredit a public figure, political
movement, company, etc. Before you share the news, it will be wise to check the news validity first.

There are several utilities that can be used to verify if something you
heard or read is a fact or fiction at for example:

(https://toolbox.google.com/factcheck/explorer)

Appreciate other’s works


(
When sharing information in the form of photographs, writings or videos which belong to others, make sure to
mention the source to show your appreciation to other’s works.

Activity 5.1.8
Online Ethics

This is a written activity.

Briefly discuss five ways to participate in an online community in and ethical and respectful way.

89
UNIT 5.2: COPYRIGHT AND PLAGIARISM, PUBLIC DOMAIN AND REFERENCING
SOURCES
In this unit, you will learn about copyright and plagiarism. After completing this unit, you will also be able to explain
what the Public Domain is. When using a person's intellectual property, it is important (law) that you show your
appreciation by acknowledging him/her. This unit will show you how to reference sources that you might have
used while completing for example a task/assignment.

Copyright
Copyright is a set of exclusive legal rights given to the author or creator of an original work. This includes the
right to copy, distribute, adapt, perform and display the work in public. The work itself does not necessarily have
to be unique. Only the owner of the material has the right to reuse, copy, print, and distribute their work,
anyone else must first obtain permission from the owner. Copyright law is automatically granted to an author or
creator as soon as the work is created. Work does not have to be registered to be protected by copyright law,
but by registering it they make the copyright more visible. Copyright also extends to unpublished work. If work
is created by an employee, then the employer is the copyright holder. (http://www.icts.uct.ac.za/Copyright_101)

Some examples of works that can be copyrighted:

• literary works, including books, poems, theses, publications, handbooks and manuals
• motion pictures, TV series and dramatic works, including any accompanying music.
• pantomimes and choreographic works
• computer software and animations
• computer software - graphical user interfaces
• songs, song lyrics, sound recordings, and music
• photographs, graphics, images, pictures
• web pages
• works of art including paintings, sculptures, architecture, and computer graphics
• educational materials including texts and tests
• programme-carrying signals
• broadcasts (radio, television, etc.)

Public Domain
Public domain refers to content that isn't protected by copyright law. This means that anything in the public
domain may be used without any restrictions – public property.

A work may be in the public domain because:

• it was created before copyright laws (example: The Bible, Tipitaka, Vedas, Quran, Tanakh, etc.),
• its copyright protection has expired (example: Moby Dick, Pride and Prejudice, songs by Ma Rainey,
etc.),
• it never had copyright protection or its protection was lost (example: a work published before March 1,
1989 and did not carry a copyright notice),
• it was dedicated to the public domain.

It might be challenging to determine whether a work is part of the public domain because the laws are complex
and have changed numerous times over the years. Just because an item is old doesn't guarantee that it is part of
the public domain. If you're at all uncertain, get permission from the creator or owner to use or copy the work
(always remember to give credit to for example an author whose ideas you are using in an assignment, whether

90
their work is part of the public domain or copyrighted). An adaptation of a work in the public domain may have
copyright protection on its own as a newer version. Adaptations include translations, amended versions and
annotated versions. For example, Shakespeare’s "Romeo and Juliet" may be in the public domain, but a new
version with explanations or illustrations may have copyright protection in these modified parts. However, this
doesn't affect the copyright status of the public domain part. After March 1, 1989, all works (published and
unpublished) are protected for 70 years from the date the author dies.

You can read my book


for free

Everyone can use E =


MC2 for free

Use my invention to build something to ‘iron


out’ all the mistakes – The Real McCoy

Plagiarism
Plagiarism and copyright violation overlap to a large extent, but they are not equal concepts Many types of
plagiarism do not end up as copyright violation, which is defined by copyright law.

Plagiarism means to present someone else’s work or ideas as your own, with or without their consent, by
incorporating it into your work without full acknowledgement. All published and unpublished material, whether
handwritten, printed or in electronic form, is covered under this definition. Plagiarism can involve copying words
or images directly, rephrasing sentences or passages, or using someone else’s ideas without mentioning the
original work and give the source the appropriate credit.

Plagiarism is a form of academic dishonesty. Whether you’re a learner submitting an assignment or a researcher
submitting an article, it’s expected that the work you submit is your own. Getting credit for work you haven’t
done impacts your learning and misleads your readers.

In academic writing, there are different types of plagiarism you might encounter:

• Global plagiarism - plagiarizing an entire text. This includes purchasing an essay or turning in an
assignment completed by someone else.
• Patchwork or mosaic plagiarism - copying phrases, passages, and ideas from different sources and
compiling them into a new text.

91
• Incremental plagiarism - inserting a small amount of plagiarized content in a mostly original text.
• Self-plagiarism - recycling your own previous work that you’ve already submitted or published.

Although text is the most common source of plagiarism, it’s also possible to plagiarize things like images, data,
music, and art. Any time you’re using something someone else created, you must give credit to the source.

Plagiarism may be intentional or unintentional. Under the regulations for examinations, intentional plagiarism is
a disciplinary offence.

Examples of unintentional plagiarism include:

• Forgetting to use quotation marks for a quote


• Own words too close to the original text
• Mentioning an idea that you read somewhere without citing it
• Including the wrong information in a citation
• Not including a complete reference list at the end of your paper

Plagiarism in tertiary institutions has serious consequences, even when committed by accident and may result in
expulsion. At school level, you will most likely receive a much lower result or zero for the task. In serious cases,
you might be suspended or even be barred from completing the final examination for a certain time.

Avoid plagiarism by quoting (using quotation marks) or formulating someone else’s ideas in your own words,
and give credit to the original author (site the source).

Activity 5.2.1
Copyright and plagiarism

This is a written activity.

Use the Internet as your primary source and state whether the following statements are TRUE of FALSE.

Provide a brief motivation for each answer:

1. Copyright status is only granted to well-known authors and filmmakers.

2. The Motion Picture Association of America has anti-piracy sniffing dogs.

3. Sam buys a new band's CD but decides he doesn't like the singer, so he resells the CD on eBay. That's
legal.

4. The sole purpose of copyright is to make authors money and protect them from getting their works
stolen.

5. Sharise tells Daniel about her summer vacation, and he says he'd love to see her pictures. Sharise uses a
peer-to-peer (P2P) file-sharing program to upload the photographs she took at camp so he can
download them. That's copyright infringement.

6. Sharise tells Daniel that the files are available. Daniel uses the same peer-to-peer file-sharing program to
download Sharise's camp pictures. That's copyright infringement.

7. Kgomotso copies the entire last chapter from the final Harry Potter book to his commercial blog without
any additional commentary. Since he only used part of the work, Kgomotso would be protected by fair
use.

92
8. Kathy downloaded a few photos of local organic farms from Flickr.com's Creative Commons (CC) pool.
She follows the rules of the photographer's specific CC license and uses them in her digital video about
sustainable agriculture. That's OK.

9. Dwight finds a peer-to-peer (P2P) network that offers free music downloads. He owns all but one of his
favorite band's CDs, and he finds that particular CD on the network. He's too stingy to buy it, so he
downloads the songs. He's not committing copyright infringement.

10. Nchabo read an interesting article about the making of the film Titanic and wants to use a short quote in
her cinema review paper for journalism class. That's copyright infringement.

11. The Public Domain is a polar research station in Antarctica.

12. Mohamed recorded a video for his YouTube channel about the upcoming Senate elections and includes
an official photo taken by a government employee and four bills authored by the incumbent that
Mohamed found on the Senate's website. That's copyright infringement.

13. Justin downloaded the black-and-white classic 'To Sir, with Love' (1967) from the Internet Archive and
decided to mix an audio sample from the film into one of his original songs. That's copyright
infringement.

14. Since Felicia forgot to register her screenplay before she sent it out to agents for review, she's no longer
eligible to copyright it.

(Copyright and Plagiarism – Carnegie Mellon University)

How to reference sources


As discussed in the previous topic that whenever you use information or ideas from a source (such as a book,
article, or web page), you must give credit to the original author in the form of a full reference.

References are usually listed (alphabetically) at the end of the assignment, article, report, etc. on a page titled
References, Works Cited, or Bibliography.

Full references always include the author, title, and publication date of the source. They also include other
information that helps to identify the source.

The exact format of a reference depends on the type of source. For example, a book reference includes the
publisher and sometimes the edition, while a journal article reference includes volume and issue numbers and
the page range where the article appears.

Two examples of references that you need to know:

For a book:

Author’s Last Name, Initial(s). (Year of publication). Title of book

Marone, P. (2020). My school days as a responsible digital citizen

Author: Marone, P.
Year published: (2020).
Title of book: My school days as a responsible digital citizen

93
For a website: (Author/Creator), Topic, Website address, date accessed

Author/Creator. Title/Topic of work. Website address (https://URL), date accessed (day month year)

Note: With websites, quite often the author is unknown. Any missing information can be left out.

What Students Really Need to Know About Digital Citizenship. https://www.edutopia.org/blog/digital-


citizenship-need-to-know-vicki-davis, viewed 2 February 2022

Topic: What Students Really Need to Know About Digital Citizenship.


Website address: https://www.edutopia.org/blog/digital-citizenship-need-to-know-vicki-davis,
date accessed: viewed 2 February 2022

Example of a detailed list of references:

Activity 5.2.2
Reference sources

This is a written activity.

Create a Bibliography for the following two sources.

Website (https://turbofuture.com/misc/Examples-of-Digital-Technology) accessed today:

94
Book:

95
UNIT 5.3: UNDERSTAND CYBERCRIME, PROTECTION AND LEGAL CONSEQUENCES
In this unit, you will learn more about Cybercrime and how to protect yourself against it. We will also have a look
at legislation and legal implications for someone who makes him/herself guilty of any form of Cybercrime. After
completing this unit, you will also be able to explain selected Acts related to Cybercrime in simple terms together
with the protection and/or implications for school learners.

Acts that we will discuss in this unit includes:

• Protection from Harassment Act

• Protection of Personal Information Act (POPIA)

• The Act on the regulation of interception of communication and provision of


communication-related Information (RICA) and

• The Electronic Communications and Transactions Act (Cybercrimes Bill)

Cybercrime
In grade 8 year, you learned that all crimes that involve a computer or
digital device and/or a network is regarded as Cybercrime. We also
looked at different types of Cybercrime, for example Identity theft,
Phishing and Hacking. We also discussed the fact that if a person is
convicted of any form of Cybercrime he/she will be liable to a fine or
imprisonment for a period, depending on the type of crime.

Cybercrime prevention tips:


https://www.saps.gov.za/alert/cybercrime_prev_tips.php

Legislation
Legislation refers to the laws/policies that are passed by Government (Parliament in particular) and signed by
the President in order to be compulsory to follow. Legislation binds all people living (even visiting) in a
community. First of all, laws protect our general safety, and ensure our rights as citizens against abuses by other
people, organizations, and by the government itself. Secondly, laws contain consequences if someone doesn’t
comply with the stipulated rules.

Protection from Harassment Act


What is the Act about? Examples contained in the Act One legal consequence of not
complying
The Protection from Harassment You are experiencing harassment if someone is You can apply for a protection order at your
Act is a law that provides victims causing you harm or threatening to cause you harm nearest Magistrates’ Court, in terms of the
of harassment with a by unreasonably: Protection from Harassment Act if you are
way to protect their rights • Following you experiencing harassment.
against harassment. It introduces • Watching you You can apply for a protection order even if you do
procedures that help the • Hanging around your home, work, school or not know the person who is harassing you.
courts and the police to protect places that you happen to be A date will be set when you as well as the alleged
the rights of victims of • Communicating with you verbally, electronically perpetrator must come back to the court and
harassment. or in any other way appear before the magistrate. This is called a
Harassment under the Act • Approaching you in a threatening way “return date”. This is the date when the
includes both direct and indirect • Sending you letters, telegrams, packages, faxes, magistrate will make the decision about whether
conduct that either causes harm emails or any other objects to give you a final protection order.
or that inspires the person Harassment also includes contact through verbal If the magistrate is of the view that there is
complaining of harassment (“the communication aimed at the complainant. enough evidence to show that the person is
complainant”) to reasonably The Act also recognises electronic communication engaging in harassment, you will get a final
believe that harm may be that causes harm or makes the complainant feel in protection order and the court can order the
caused. danger of being harmed as harassment. person who is harassing you to stop.

96
It also broadens the categories of harassment to Any person who contravenes such an order is
include bullying at schools and cyber-stalking guilty of an offence and liable on conviction to a
fine or imprisonment for a period not exceeding
five years.

Protection of Personal Information Act (POPIA)


What is the Act about? Examples of personal information contained in One legal consequence of not complying
the Act
The purpose of the Protection of ‘‘personal information’’ means information relating There are essentially two legal penalties or
Personal Information Act (POPIA) to an identifiable, living, natural person, and where it consequences for the responsible party:
is to protect people from harm is applicable, an identifiable, existing juristic person, • A fine or imprisonment of between R1 million
by protecting their personal including, but not limited to: and R10 million or one to ten years in jail.
information. To stop their money • information relating to the race, gender, sex, • Paying compensation to data subjects for the
being stolen, to stop their pregnancy, marital status, national, ethnic or damage they have suffered.
identity being stolen, and social origin, colour, sexual orientation, age, Other penalties (outside court) include:
generally to protect their privacy, physical or mental health, well-being, disability, • Reputation damage
which is a fundamental human religion, conscience, belief, culture, language • Losing customers (and employees)
right. and birth of the person; • Failing to attract new customers
To achieve this, the Protection of • information relating to the education or the But your main motivation for complying with the
Personal Information Act sets medical, financial, criminal or employment Protection of Personal Information Act (POPIA)
conditions for when it is lawful history of the person; should be to protect people from harm.
for someone to process someone • any identifying number, symbol, e-mail address,
else’s personal information. physical address, telephone 10 number,
location information, online identifier or other
particular assignment to the person;
• the biometric information of the person;
• the personal opinions, views or preferences of
the person;
• correspondence sent by the person that is
implicitly or explicitly of a private or confidential
nature or further correspondence that would
reveal the contents of the original
correspondence;
• the views or opinions of another individual
about the person; and
• the name of the person if it appears with other
personal information relating to the person or if
the disclosure of the name itself would reveal
information about the person

The Act on the regulation of interception of communication and provision of communication-related


Information (RICA)
What is the Act about? Examples contained in the Act One legal consequence of not complying
RICA is the piece of South African RICA provides that all forms of monitoring and Any person who failed to comply with the Rica law
legislation that governs the interception of communications are unlawful unless would be deemed guilty of an offence and liable
interception or monitoring of the monitoring and interception takes place under on conviction to a fine (not exceeding R60 000) or
paper-based and electronic one of the recognized exceptions in RICA. There are to imprisonment for a period not exceeding 12
communications. several exceptions to the general rule on the months.
RICA states that no person – who prohibition on intercepting communications, three of
is not a party to the which apply to monitoring in the workplace:
communication, who does not • Party to a communication: Section 4 of the
have prior written consent or is RICA allows a party to a communication to
not acting in the course of monitor and intercept the communication if
business – may intentionally he/she is a party to the communication (for
intercept, attempt to intercept, example, where the participants in a meeting
authorize or procure any other consent to the meeting being recorded). This
person to intercept or attempt to exception also applies where the interceptor is
intercept at any place in the acting with the consent of one of the parties to
Republic any communication in the communication.
the course of its occurrence or • Written Consent: Section 5 allows for
transmission. interception of any communication under any
circumstances – i.e. no special motivation or
reason is required for it provided the person
whose communication is being intercepted has
consented to it in writing prior to such
interception.
• Business Purpose Exception: Section 6 contains
a so-called “business purpose exception” which
involves the interception of “indirect
communications in connection with the carrying
on of business”. Section 6 authorises any person

97
to intercept indirect communications in the
course of carrying out their business by means
of which a transaction is concluded in the
course of that business, which “otherwise
relates to that business” or which “otherwise
takes place in the course of the carrying on of
that business, in the course of its transmission
over a telecommunication system”.

The Electronic Communications and Transactions Act (Cybercrimes Bill)


What is the Act about? Examples contained in the Act One legal consequence of not complying
The Electronic Communications Some of the offences covered by the Act, amongst The Act prescribes certain sentences for offenders,
and Transactions (ECT) Act 25 of others, include: which entail fines ranging from R5 million to R10
2002, CHAPTER XIII (Cybercrime) • hacking, million and/or imprisonment ranging from 5 to 10
and CHAPTER VII (Consumer • unlawful access to a computer or device such as years, with other more serious offences will lead
Protection) was South Africa’s a USB drive or an external hard drive, to imprisonment of up to 15 years and an
first legislative provisions interception of, and interference with data or imprisonment period not exceeding 25 years for
relevant to cyber-criminal computer programs and systems, computer related terrorist activity and related
offences • unlawful acquisition, possession, receipt or use offences. The Act imposes lesser sentences for the
The Cybercrimes Bill is an of a password dissemination of data messages which advocates,
adjustment to the Electronic • ransomware, promotes, or incites hate, discrimination, or
Communications and • forgery, fraud, extortion, and aggravated violence to imprisonment not exceeding 2 years,
Transactions Act relating to offences online, or a fine.
cybercrime offences. • malicious communications.
The Cybercrimes Act aims to
keep people safe from criminals,
terrorists, and other states. It
also combines cybercrime laws
into one place. The act aims to
stop cybercrime and improve the
security of the country.

According to South African law, the minimum age of criminal


capacity is 12. That means anyone over the age of 12 have full
criminal capacity. That is the age when you are held criminally
responsible for any offences you may commit.
This is only for you to know, we know all of you are law abiding
citizens and wouldn’t act in above mentioned capacity

Activity 5.3.1
Legislation - Class Discussion

Discuss the following actual Court Cases

• Classify each case under the Act that was violated

• If you were the judge, how would you have ruled during each case?

• What might have been the legal consequence(s) in each case if the Court ruled in favour of the
Applicant?

1. Botha v Smuts and Another

In Botha v Smuts, Botha applied to court for an order that Smuts must remove a Facebook post.

98
Louw found two carcasses in cages on a farm while he was cycling. One carcass was of a baboon, and the other
of a porcupine. Louw took photos of the animals and sent them to Smuts who is the director of a conservation
NGO.

Smuts made some enquiries to identify the farm owner where Louw found the carcasses. When Smuts identified
Botha as the farm owner, he ran a Google search using his name and found his address and cell phone number.
Smuts contacted Botha via WhatsApp to ask hm if he had a permit to trap animals. Botha confirmed that he had
a permit to trap and kill any number of baboons and porcupine.

Smuts posted an image of his Whatsapp chat with Botha on the NGO’s Facebook page. He also posted Botha’s
Whatsapp profile photo, and a Google map image of Botha’s farm to Facebook. The Whatsapp photo was of
Botha and his minor child. Thereafter, several members of the public posted defamatory comments on the post.
(Botha v Smuts and Another (2832/2019) [2020] ZAECPEHC 19 (4 June 2020))

2. Fourie v Van Der Spuy and De Jongh Inc.

In this case, the client of a law firm (the Applicant) applied to the High Court seeking an order for damages
against two practicing attorneys and their law firm (the Respondents) after one of the attorneys (the Attorney)
had erroneously transferred the Applicant’s funds out of the law firm’s trust account and into several bank
accounts held by one or more unknown hackers.

The Attorney had previously acted for the Applicant and was holding the funds in the law firm’s trust account for
the benefit of the Applicant, who had instructed the Attorney to retain the funds on his behalf. The Attorney
subsequently received a number of emails purportedly sent from the email address of the Applicant, informing
her of the “Applicant’s” new banking details and instructing payment of the funds into a number of bank
accounts. The Attorney paid the funds as instructed, without verifying the new banking details with the
Applicant. It was only after the Attorney had transferred the funds into the new bank accounts that it was
discovered that one or more unknown hackers had hacked the Applicant’s email and provided the details of
their own bank accounts – wherein the funds had erroneously been deposited by the Attorney.

(Fourie v Van Der Spuy and De Jongh Inc. 2019 JDR 1801 (GP))

99
UNIT 5.4: DIGITAL ENTREPRENEURSHIP
In this unit, you will learn more about Digital Entrepreneurship. What it takes to be a Digital Entrepreneur and the
steps that need to be taken to get your business up and running.

Digital Entrepreneurship
Digital entrepreneurship is a term that describes how entrepreneurship will change, as business and society
continue to be transformed by digital technology.

Digital entrepreneurship includes everything that is new and different about entrepreneurship in a digital world,
including:

• New ways of designing and offering products or services.


• New ways of finding customers.
• New ways of generating income, and how to keep costs to the minimum.
• New opportunities to collaborate with platforms and partners.
• New sources of opportunity, risk, and competitive advantage (ways to outperform competitors).

On a practical level, digital entrepreneurship opens doors to new possibilities for anyone thinking of becoming
an entrepreneur.

Some examples of Digital Entrepreneurship:

• Freelancing or Gig based work


• Online Tutoring/ Online Teaching / Online Coding Jobs
• Ecommerce or drop shipping or affiliate marketing
• Content Creator [Blogging or vlogging (YouTuber)]
• Become online Author, Translator or Voice Over Artist or Online Photography
• Sell designer merchandise or Art Items or Own Music.
• Start digital marketing service or build products or become social media influencer
• Domain or website seller, online website tester.
• Start any other services or products that you can offer virtually & globally.

First steps in starting your journey as a digital entrepreneur:

• Choose a business model that is right for you


The internet offers an infinite number of opportunities to make money by selling products and services
to others. Knowledge and experience on a specific topic will serve as a strong foundation for starting
your business. It is wise to start something that you have a passion for.
• Determine the market potential
When considering a potential business venture, you should always research the market potential before

100
launching your business. You want to be sure there are enough people out there who need your
product or service before you invest too much time, energy, and money.
• Assess the competition
Find out who is advertising to your market. Do a keyword search on the Internet and pay attention to
the paid results (the ads) that appear. These ads will tell you which companies are paying to appear in
front of this market, and if they’re paying to be there, they’re most likely making money. If no ads
appear, that can mean one of two things, either that market isn’t profitable, or you’ve spotted an
opportunity to enter a market with very little competition.
• Set up your website
Once you’ve decided on a name for your business, you need to
purchase a web domain. Your domain is the internet address
where your website will reside. Now you can start creating a
website. Some Social Network platforms allow members to create
pages that you can also use to run your business from.
• Create your core offer
This is your signature product or service. Different formats include: sales, coaching, consulting, online
courses, software, freelance services, etc.
• Market your business
It doesn’t matter how nice your website looks, or how great your products or services are, or how well-
priced your products are, if no one knows about your business, no one will visit your website. If no one
visits your website, you won’t make any sales. Marketing strategies include paid advertising, search
engine optimization, social media marketing and email marketing.

In terms of education, digital entrepreneurship opens new possibilities to train the next
generation of entrepreneurs. The best way to learn entrepreneurship is to ‘do it’, and
reflect on that experience. Although it sounds like an impulsive dive into starting a new
business, or launching a new product, careful planning will be the key to success. In the
normal world, it is much more costly and risky especially for beginners. The digital world
not just lowers the barriers for starting something new, but offers a variety of pathways to
success.

Activity 5.4.1
Digital entrepreneurship Careers - Class Presentation

Work in pairs and do some research on any career position related to Digital entrepreneurship.

After collecting some information, create a short video or presentation and present your findings to the class.

Some ideas for headings:

• Job Title
• Job Description
• Primary Duties
• Desired Skills
• Desired Experience
• Salary Scale
• Etc.

To make sure not everyone is doing a presentation on the same position, first provide your teacher with your
idea.

101
UNIT 5.5: CONSOLIDATION ACTIVITIES
In this unit, you will complete a few activities merging some of the content discussed throughout this chapter.

Guided Activity 5.5.1


How to prevent Online Abuse

How to deal with Online Abuse when it happens.

Every Step You Take

EVERY Complete, entire, all. When each individual or action is included without exception.

STEP An action or movement often occurring as one in a series, such as the advance or movement
made by raising the foot and bringing it down elsewhere.

YOU A person, or people in general, being directly spoken to or acknowledged.

TAKE Lead, guide, do. To move somebody or something from one place or situation to another.

(MATTERS) Have important or significant effect on somebody or something.

Objective:

Make individualized footprints to provide you with an opportunity to reflect on the steps you can take to create a
world without bullying. This activity is designed to help you recognize that every step you take individually helps
unite all along the path for kindness, acceptance, and inclusion.

Materials:

• Paper: Generally, size A4 (21cm x 29.7cm) works best.

• Pencils: Ideal for tracing the outline of your own footstep as the lines are less likely to show.

• Scissors: Use to cut-out the “step.”

• Pens, Crayons, or Markers: Perfect for recording your action on your “step.”

Instructions:

1. Trace their footstep(s) on the paper. Or, instead of tracing footstep, use a foot or shoe template.

2. Cut out the footstep(s).

3. Write action step inside the cut out(s).

102
4. Write your name under the action.

5. Collect the “steps.”

6. Hand in all the steps.

Activity 5.5.2
Student Created Videos and Group Discussion

Your teacher will decide on one of these videos that you will watch in class and thereafter you will have a group
discussion guided by some questions related to the specific situations.

Help Me – A Song by Dat


Stern (https://www.pacer.org/bullying/classroom/middle-
highschool/student/help-me.asp) – Twin brothers, Stacy and Sterling, decided
to start a music group called Dat Stern; they wanted to make music that could
inspire people and help others. Stacy states, “My brother and I suffered from
bullying all throughout middle and high school. So, when we decided to make
music, that was our main focus. Our goal is to put an end to bullying.”

Speak (https://www.pacer.org/bullying/classroom/middle-
highschool/student/marinav.asp) – Marina V is a recording artist, singer and
songwriter in Los Angeles. She is originally from Moscow, Russia and
experienced bullying at school as a child. Her song “Speak” inspires listeners to
believe in themselves and be proud of who they are. Marina is passionate about
sharing this important message.

Stronger (Than You Seem) (https://www.pacer.org/bullying/classroom/middle-


highschool/student/jetset-getset.asp) – “Stronger” is a song written for the
group “Jetset Getset” to help young people who are feeling discouraged. The
writer, Jennifer Eliason shares, "Middle school is a time when self-esteem can
take a beating. We wanted to write a song for the group (Jetset Getset), who
are in middle school, about how you can rise above the challenges and the
experience can make you stronger."

Hayley Reardon Music (https://www.pacer.org/bullying/classroom/middle-


highschool/student/hayley-reardon-music.asp)– Music is the universal language
of emotion and Hayley Reardon expresses herself so eloquently through her
original compositions. Hayley taps into her talent and gifts to create poignant,
heartfelt songs about being a teen. Hayley's original music and videos can be
played in classroom, and are accompanied by classroom discussion questions.

103
Butterfly (https://www.pacer.org/bullying/classroom/middle-
highschool/student/butterfly.asp)– By Lizzie Sider, Jamie O'Neal, Lisa Drew,
Jimmy Murphy
Lizzie is a country music singer/songwriter, who experienced verbal teasing and
ridiculing from other children in elementary school. Her song, “Butterfly” tells
her story and how she overcame her situation. Lizzie is passionate about helping
raise awareness about bullying, and trying to effect change.

Broken (https://www.pacer.org/bullying/classroom/middle-
highschool/student/anna-richey.asp)– Anna Richey is a singer/songwriter from
Salt Lake City with a dream to inspire people with her music. She hopes to
influence the world for the better, starting with her single Broken. To
accompany this powerful song, Anna has created a toolkit to help students think
about how they can take action in bullying situations.

Activity 5.5.3
Copyright vs Public Domain – Mini Research Task (2 to 4 learners)

Make use of the Internet to answer the following questions related to Copyright and Public Domain.

Remember to give credit to the authors from who you got information from that guided you to answer the
questions. At the end of the task include a Bibliography for these sources that you used.

1. What is copyright?
2. What types of works are protected by copyright?
3. What is not protected by copyright?
4. If I have an idea in my head, is it automatically copyrighted?
5. Who owns the copyright in for example recorded music?
6. When does copyright start? Do I first have to register the work with the ‘Companies and Intellectual
Property Commission’?
7. What is meant by Fair Use?
8. What is the Public Domain?
9. Name the three main categories of public domain works.
10. Where can I find public domain works?
Give two examples

Activity 5.5.4
Digital entrepreneurship – Group Activity

In groups of 4 to 6 learners decide on an Online Business idea

Come up with a Business Plan for this business by addressing the ‘First Steps’ as discussed in Unit 5.4

104
Activity 5.5.5
Word search – Individual Activity

Q W D F B T C R S P U P O P R
P K S A I A D C H H L S S O E
S N C W O H F E C G G N F U K
P S E Y Z L P R A L U L L E C
R Y F T B H N A M N O I J C A
I M W S I E N W S U V A D D H
V A O P N Q R P O S W M X S V
A P L I U G U E V D W E T J I
T S L W A P M E T G U O I L R
E N P T N M A L T H P R R C U
O F O Y A Z L T K T I A K D S
A E K C W F W W S N E C Z Q M
G M S T B A A W J B T F S U N
B X C Y B E R B U L L Y I N G
H S Q O J E E E O O N F V B N

CELLULAR DOWNLOAD HACKER


PASSWORD SCAM STOP
CYBERBULLYING EMAIL MALWARE
POPUPS SPAM VIRUS
CYBERETHICS GEOTAG ONLINE
PRIVATE SPYWARE NETIQUETTE

105
Activity 5.5.6
Crossword puzzle – Individual Activity

Hint: Use the words in the previous activity (Activity 5.5.5)

4. Being connected to the Internet 1. It allows others to know where you have taken a
5. Software that is used to collect personal picture
information without your permission 2. Treating others online the way you want to be
6. Don't share this with anyone other than your treated
parents 3. Personal information should always be kept
9.The act of repeatedly harassing someone over the 7. Someone who can gain unauthorized access to
Internet other computers or devices
10.An online offer for a free Apple iPad is usually a 8. Involving a cell phone
………………….. 10. Junk email
12. ............ .THINK.CONNECT. 11. Software designed to damage a computer or
14. Whenever you receive information from the device
Internet, you ....................... it to your computer 13. Don't be fooled into clicking on these
15. An electronic mail used for communicating with (hyphenated word)
another person
16. A program that can make your computer sick

106
Resources:

https://guides.library.cmu.edu/copyright/plagiarism

https://www.pacer.org/bullying/classroom/middle-highschool/

Videos:

https://www.commonsense.org/education/videos/super-digital-citizen

https://www.youtube.com/watch?v=VBOiF4ius6A

https://www.youtube.com/watch?v=ZMFrvv8dUnM

https://youtu.be/vZdcRFiNxws

To read:

https://www.commonsensemedia.org/articles/cellphone-parenting

https://resources.demco.com/digitalcitizenshipactivityguide.pdf

107
CHAPTER 6: SPREADSHEETS
Chapter Overview

Unit 5.1 Term 1 provides an introduction to basic graph


Introduction to Graphs elements and types of graphs.

Unit 5.2 Term 1


draw conclusions by analysing graphs/charts
Understanding graphs

Term 2
Unit 5.3 rename, add, delete, change colour of tab,
Working with Sheets hide, unhide

Chapter 5
Spreadsheets

Unit 5.4 Term 2 additional functions are introduced to


Calculations with COUNTA compliment what the learners already know
COUNTBLANK, ROUND and COUNTIF from the previousu year

Unit 5.5 Term 2 How to solve, detect and identify simple


Troubleshooting basic errors in spreadsheet errors associated with the
formulae and functions functions learnt

Term 3
Unit 5.6 How to format the spreadsheet for printing
Page setup options purposes

Prior Knowledge

Grade 8 spreadsheets:

At the end of the chapter you should be able to:


• Create graphs/charts from given data and choose appropriate graph types
• Use the chart and axis title, data labels and legend.
• Delete, Add and Rename sheets on a spreadsheet
• Calculate using the COUNTA, COUNTBLANK, ROUND and COUNTIF functions
• Troubleshoot basic errors with functions
• Format and edit a spreadsheet for printing
• Identify and fix basic errors

PLEASE NOTE: The full stop is used as the decimal symbol in this chapter, as per accepted policy of the
NSC examination. Refer to Addendum A: Regional settings, on how to set it correctly .

108
DEFINITIONS
 A spreadsheet is an electronic document in which data is arranged in the rows and columns of a grid and
can be manipulated and used in calculations and graphs.
 A row is the range of cells that run in a horizontal direction in a spreadsheet. Rows are identified by numbers
e.g. row 1.
 A column is the range of cells that run in a vertical direction in a spreadsheet. Columns are identified by
alphabetical letters e.g. column A, column AC. .Columns could contain the headings of a table.
 A cell is the intersection between a column and a row. A cell can contain text or numbers and is identified by
the letter of the column combined by the number of the row, for example E4.

Create a folder called “Practical Spreadsheets_Your Name” where you will be able to easily access it again.
Your teacher will give you data files to work with when exploring spreadsheets. These files and all other
practical work will be saved in this folder. Remember to save your work every few minutes. Learn to use
the shortcut Ctrl + S to save while you work.

Unit 5.1: Introduction To Graphs


In this unit you will learn how to create graphs or charts from given data in a spreadsheet. Graphs give us
the opportunity to present the data visually in order to understand and interpret it better.
Here are some examples of graphs done in Excel, the spreadsheet program created by Microsoft.

Vertical Bar graph Horizontal Bar Graph

Trend Lines Scatter Plots

109
Dot graphs Pie Graphs

Guided Activity 5.1.1 – Creating A Chart


Let us start by revising an activity done in grade 8.
Open the guided activity GA 5.1.1 & 5.1.2 Family from the folder “Practical Spreadsheets_Your Name”.
The spreadsheet contains the daily cash used by a family and should contain the information as in the
example below:

The spreadsheet is our data source. The information is arranged in the form of a table with columns
representing the days and rows representing the person involved. The way in which your data source is
arranged is very important.
To create a chart, follow the instructions below:
Step 1: Select cells B4:G9 – Put the mouse cursor in cell B4 and drag up to cell G9

110
Step 2: Open the Insert Chart window – With the cells selected, open the Insert tab on the ribbon. Select
the Recommended Charts in the Charts group.

Step 3 Selecting a Chart – The Insert Chart window appears. Scroll through the left panel to see the
recommended types of Charts (Clustered Column, Line, Stacked Column, Stacked Area etc.), or select All
Charts to see all the charts that Excel can generate for you.
Select the first recommended Clustered Column Chart and press the OK button.

The following chart has been generated :

111
Chart Title
200
180
160
140
120
100
80
60
40
20
0
Monday Tuesday Wednesday Thursday Friday

Father Mother Toddler Preteen Teenager

Step 4 – Save and close the spreadsheet.


A Graph/Chart should have a Chart Title, Axis Title, Data Labels and a Legend. We will now look at each of
these characteristics and incorporate them into our chart.
Chart Title – A Chart Title identifies the graph/chart to any chart user. It is displayed above the graph. The
Chart Title is also included when the graph is printed or saved.
Axis Title –Axis Titles are added to the horizontal and vertical axis to indicate what each axis represents.
Data labels – Data Labels are used to display source data in a chart directly. They are usually derived from
the source data, but they can include other values as well.
A Legend – The Legend of a graph reflects or explains the data displayed in the graph’s Y-axis, also called
the graph/chart series. A graph legend generally appears as a box to the right or left of your graph.You can
define various display options for a graph legend.
Guided Activity 5.1.2 - Editing Chart Title, Axis Title, Data Labels and Legend
Continue in the same spreadsheet you used for the previous activity: GA 5.1.1 & 5.1.2 Family in “Practical
Spreadsheets_Your Name”.
Step 1 - Editing the Chart Title
1.1 Select the default chart title element on the chart area.
1.2 Replace the words “Chart title” with our title “ Family daily cash used”.

Family daily cash used


200

150

100

50

0
Monday Tuesday Wednesday Thursday Friday

Father Mother Toddler Preteen Teenager

112
Step 2: Editing the Horizontal Axis Title and the Vertical Axis Title
2.1 Double click on the chart area to activate the Chart Design Menu element.
2.2 Click on the Add Chart Element on the Chart Layouts ribbon
2.3 Select the Primary Horizontal under the Axis Title.

2.4 Now Select the axis title which will appear at the bottom of the Chart and edit the title element to
“Days of the week”.
2.5 Follow the same steps in 2.1 to 2.2 to select the Primary Vertical Axis Title. Edit the title element to
“Money”.

Family daily cash used


200
Money Used/Rands

150

100

50

0
Monday Tuesday Wednesday Thursday Friday
Day of the Week

Father Mother Toddler Preteen Teenager

Step 3: Moving the position of the Legend


3.1 Activate the Add Chart Elements by following Steps 2.1 and 2.2 above.
3.2 Select Legend and Right, to place the Legend on the right, removing it from the bottom.

113
Save and close the spreadsheet.

With your data selected you can press Alt+F1 and


the default graph will be generated for you

Main concepts learnt from the guided activities:


✓ All graphs/charts are generated from a table of data
✓ You can choose any type of graph you want
✓ The Legend, Title and Axis labels can be changed.
The following activities will explore choosing different types of graphs and also changing the way the data is
laid out in the table.

Activity 5.1.1
Practical Activities: learners must attempt to do the following activities without guidance from a teacher.
Open Act 5.1.1 from your folder “Practical Spreadsheets_Your Name”.
1. Calculate the total for each person.
2. Create a Pie Chart of the total amount used per person.
3. Add a Chart Title and Data Labels as indicated in the image below:

Total Per person


R318.00

R713.00
R202.00

R248.00

R358.00

Father Mother Toddler Preteen Teenager

114
Activity 2: Use the same data to create a second Pie Chart similar to the one displayed below:
1. Calculate the total for each day.
2. Display the totals spent per day.
3. Take note of the Chart Title, the positions of the Legend and the position of the data labels.
Total per day

R341.00 R348.00
Monday
Tuesday
Wednesday
R343.00 R359.00
Thursday
Friday

R448.00

Save and close the spreadsheet.

Guided activity 5.1.3


Study the following graph graph:

120

100

80

60

40

20

0
1998 1999 2000 2001 Total

Maize Beans Tomatoes Total

1. The graph is not user friendly. Identify at lease 5 possible issues to support the statement.
2. Write down these issues in your writing book and indicate next to each how you would solve it.
Activity 5.1.2
Practical Activities: learners must attempt to do the following activities without guidance from a teacher.

PLEASE NOTE: The full stop is used as the decimal symbol.


Make sure that the Regional Settings are correct. Refer to Addendum A.

Activity 1: Use the following data on crop production per ton in South Africa to carry out the instructions
below:

115
Crop Production per ton 2016 - 2019
Crop 2016 2017 2018 2019 Total
Maize 25.2 25.9 29.2 30 110.3
Beans 15 19.1 17.2 18.1 69.4
Tomatoes 12.5 16.2 8.2 9.4 46.3
Total 52.7 61.2 54.6 57.5 226
1. Enter the data into a blank Excel spreadsheet.
2. Take note of the formatting and alignment.
3. Save the spreadsheet as Act 5.1.2 in the folder “Practical Spreadsheets_Your Name” you have created
earlier.
4. Create a suitable graph that will indicate the trend from 2016 to 2019 of all three crops listed.
5. Add all necessary chart elements so that a user will be able to understand and interpret the graph
easily.
6. Use a function to determine the total for each crop, as well as the totals for each year.
6. Save, but do not close the spreadsheet. Open a blank Word document.
7. Copy the graph from the spreadsheet and paste it into the Word document. Save the document as
Act 5.1.2 Graph in the same folder indicated above. Close both files.

5.2: Understanding graphs


Charts and graphs usually are used to summarise data. They make it easy to see trends and the amount of
variation in the information being studied. It is therefore necessary to learn how to read and interpret
graphs and charts.
https://www.englishhints.com/charts-and-graphs.html

Guided Activity 5.2.1 – Interpret a graph


Study the graph below and discuss it with the teacher and class mates.
Thereafter answer the questions that follow in your writing book:

https://www.mathsisfun.com/data/bar-graphs.html
1. What kind of graph is this?
2. How many people prefer Romantic movies?
3. What is the difference between the number of SciFi movie watchers and the number of people who
prefer Drama?
4. How many people in total were asked about their movie favourites?

116
5. Wat percentage prefer watching Comedy?
6. Will a pie chart drawn from this data be as functional? Motivate your answer.

Discuss the data


and graphs
about the Nicest
Fruit in the same
manner. Draw
conclusions.
https://www.ma
thsisfun.com/dat
a/bar-
graphs.html

Activity 5.2.1
Study the chart about Favourite colours.
Answer the questions that follow in your writing book without the guidance of the teacher:

Favourite colour
70
65 61
60
55
50
45 43
40
Children

40
35
30
25 21
20
20
15
10
10
5
Preschool Primary Secondary

Green Blue Yellow Red

1. How many children are there in each phase?


2. Which colour is the favourite in Preschool?
3. How many children’s favourite colour is blue?
4. What percentage of Primany school school children prefer green?

117
5. What is the favourite colour across all three phases?
6. Which two colours received the same number of votes?
7. What percentage votes did the most favourite colour received?
8. How many children in total took part in the survey?
9. How many Secondary phase learners like red best?
10. What is the chart element name for the 4 colours that appear at the bottom of the chart?
11. What could the vertical axis be named?
12. What are the numbers called that appear above some of the bars?

Unit 5.3: Working with Sheets


A workbook in Excel contains at least one worksheet, but has the feature of adding many sheets to the
same workbook. It is also possible to work across these sheets.
Organising data for an athletics meeting is an example where multiple sheets in one workbook will be an
advantage. Each category at the event could be entered and processed on its own sheet, making it easier to
keep track of athlete names, points, achievements, etc in each category. A summary across all worksheets
is made at the end of the event to determine category winners as well as overall winners.
In this unit you will learn how to add, delete, rename and even hide worksheets in a workbook.

Guided Activity 5.3.1 - Rename, add, delete, hide worksheets


Step 1: Rename a Worksheet
Open a new Excel Workbook and save it as “GA 5.3.1 Sheets” in your folder “Practical Spreadsheets_Your
Name”.
Study the sheet in front of you. One sheet is usually provided by default, named Sheet1. The name is
displayed at the bottom of the sheet in a tab. When more sheets are added they are named Sheet2,
Sheet3, etc. These default names are not helpful when one wants to know what each sheet contains and it
is therefore sometimes necessary to change it to a more descriptive name.

There are two ways to rename a sheet:


• Right click on the tab to activate a pop up menu, as indicated in the screenshot above. Choose the
“Rename” option and type the new name of the sheet.
• The second method is by double clicking the tab name. The text will be selected, ready for you to
type the new name.

118
Rename “Sheet1” to “Dashboard” using any of the two methods.

to

Excel has a small set of reserved names that you can never use. To
witness this problem, try to create a worksheet named History. Excel
doesn’t let you because it uses the History worksheet as part of its
change tracking features. Use this Excel oddity to impress your friends.

Step 2: Add a worksheet


By selecting and clicking the plus sign next to the first sheet a new worksheet will be added, with the
default name Sheet2. Add a third sheet.

to
Step 3: Delete a worksheet
Right click on the sheet name to activate the dropdown menu again. Select Delete to remove the sheet.
Delete Sheet 2.
NOTE: Be sure that you want to delete it because it is not possible to undo this operation.

Step 4: Hide a worksheet


It might sometimes be necessary to hide a worksheet:
Select the sheet, right click to activate the popup menu. Choose Hide. Only the selected sheet will be
hidden. The same method is used to unhide it: choose Unhide from the menu. Hide Sheet 3.
Step 5: Change the colour of the Tab
To change the colour of the name tab, the Tab Color option is chosen from the dropdown menu. A dialog
with different colour themes will appear for easier colour selection options. Change the colour of
Dashboard to any colour of your choice.

119
Save and close the spreadsheet.
Using the Menu Option
The Home Menu can also be used to add, delete, rename, hide and change the tab colour. The Cells section
of the ribbon allows you to edit sheets as well.

Activity 5.3.1
The following activity should be attempted without guidance by the teacher.
Open the file Act 5.3.1.xlsx from “Practical Spreadsheets_Your Name”.

120
1. Rename Sheet5 to Accounts
2. Change the colour of the Accounts sheet tab to dark green
3. Delete the sheet April
4. Hide the sheet home
5. Move Accounts to the first position
6. Rename Sheet2 to MarksGraph.
Save and close the spreadsheet.
Unit 5.4: Calculations with Count
COUNTA(), and COUNTBLANK()
In Excel it is possible to count the values in a range. The counting functions COUNT(), COUNTA(),
COUNTBLANK() and COUNTIF() are used for these purposes. You have learnt about COUNT() in grade 8, so
it will just be revised here.
The syntax of these functions are similar to the SUM() function. Although they all count, each of these
functions have a different application:
• COUNT() - counts the number of cells in a range that have numeric input, including dates;
• COUNTA() - counts cells in a range containing numeric, text or any other content;
• COUNTBLANK() - counts the number of empty cells in a range;

Guided Activity 5.4.1


Step 1: Open the workbook GA 5.4.1 & 5.4.2 & 5.4.3 from “Practical Spreadsheets_Your Name” and work
on the COUNT sheet.
Step 2: Use the COUNT function in cell F2 to count all the entries in range B2:C7. The correct answer should
be 7.
Step 3: Use the COUNTA function in cell F4 for the same range, B2:C7. The answer should be 8. Explain to
the person sitting next to you why the two answers differ.
Step 4: Use the COUNTBLANK function in cell F6 to count how many blank cells there are in the range
B2:C7. The correct answer should be 4.
COUNTIF()
Note: the comma is used as a list separator in functions. Please refer to the Addendum A on Regional
Settings for the correct setting.
The COUNTIF function counts specific entries in a range according to criteria set in the function. For
example, in a range containing the names of learners and the type of sport each one is involved in, a
COUNTIF function could be used to count the number of rugby players. The construction of the function in
this example will be: =COUNTIF(B4:B23,”rugby”). If the condition/ criteria, “rugby” is met, the entry is
counted every time it appears in that range. Note that words in a COUNTIF function is entered between
inverted commas. It is also possible to have numbers as a criteria.
In some instances it might be necessary to count how many numbers are smaller than a specific number,
for example how many learners in a group achieved less than 50% in a test. The function in this example
will be: =COUNTIF(C2:C34,”<50”). Note that the “<” symbol changes the number to text and the criteria in
this case also has to be between inverted commas.

121
Guided Activity 5.4.2
Step 1: Open the workbook GA 5.4.1 & 5.4.2 & 5.4.3 from your folder and work on the COUNTIF sheet.
Step 2: Use the COUNTIF function to count the following:
• In cell E2: how many times the number 11 appears in the range B2: C7;
• In cell E3: how many times the word Mother appears in the range B2: C7;
• In cell E4: how many numbers are smaller than 10 in the range B2: C7;
• In cell E5: how many numbers are greater than 10 in the range B2: C7;
• In cell E6: how many numbers are smaller than AND equal to 10 in the range B2: C7;
• In cell E7: how many times the number 17 appears in the range B2: C7.
The correct answers are displayed below. Make sure your answers correlate:

Note that the date is also counted as a number.


Save and close the spreadsheet.

ROUND()
More than one function to round numbers are available in Excel, but we will only look at the most basic and
most commonly used: ROUND(), which rounds a numeric value to whatever level of precision you choose.
Similar to the COUNTIF function, the ROUND() function needs two arguments: the actual number you want
to round, and the number of digits you want to round it to: =ROUND(number to round, number of digits)
For example, the following formula rounds the number 3.987 to two decimal places. The result is
3.99.=ROUND(3.987, 2).
Use the cell reference of the number instead of the number itself in the function to ensure that if the
number changes, the function will update and still be correct, for example: =Round(C3,2)

Guided Activity 5.4.3


Step 1: Open the workbook GA 5.4.1 & 5.4.2 & 5.4.3 from “Practical Spreadsheets_Your Name” and work
on the ROUND sheet.
Step 2. Enter the number 16.5837 in the cell C4.
Step 3. In D4, enter =ROUND(C4,3), Enter. The result is 16.584.
Step 4: Follow the instructions on the sheet to round the number to 2 and 1 decimals. The answers should
be as follows:

122
Consolidation Activity
ACTIVITY 5.4
The following activity should be attempted without guidance by the teacher.
Open Act 5.4 from your folder “Practical Spreadsheets_Your Name” and study the contents. Some of the
functions you will use have been done in grade 8, for example SUM, MIN, MAX, AVERAGE. Revise them
before you attempt the activity.
Answer the following questions by using appropriate functions to do the calculations. Take note of the cell
references in which the answers should be displayed.

1. In cell E75: the total number of members.


2. In cell E76: the age of the oldest member
3. In cell E77: the age of the youngest member
4 In cell E78: total number of males
5 In cell E79: total number of females
6 In cell E80: total deposit paid
7 In cell E81: How many did not pay a deposit?
8 In cell E82: How many paid more than R2000 deposit?
9 In cell E83: average amount deposited by all
10 In cell E84: Total amount as in column I
11 In cell E85: average age of all members correct to 2 decimal places
12 In cell E86: How many members booked at Perle Beach?

Unit 5.5: Troubleshooting basic errors in formulae and functions


The general steps for solving any problem are:

• Analyse (understand) the problem


• Devise a possible solution
• Try out the different possibilities
• Reflect or analyse if the problem has been solved
In the case of the functions the most common reasons for not getting the expected results are :
• Incorrect functions
• Incorrect referencing of cells (dividing by zero)
• Missing data
• Syntax errors
Here are the common errors and their causes

Error Common cause


########## The column is not wide enough to display answer
#NAME! Typing/Spelling mistake
#REF! The cell reference in the formula is not valid anymore, maybe that cell, row, column
has been deleted
#DIV/0!, Division by zero, this happens when you try to divide by zero or maybe an empty cell
#VALUE! There's something wrong with the way your formula is typed. Or, there's something
wrong with the cells you are referencing.
#NUM! Incorrect data used, for instance where text is multiplied by a number

123
Unit 5.6: Page setup options
Formatting and editing for Printing:
o Set paper size, page margins and page orientation
o Insert headers and footers
o Set a print area and print titles (Gridlines, repeat rows/columns)

Set paper size, page margins and orientation


Use the Page Setup dialog box to set up layout and print options of a page.
Click on the Page Layout tab, then in the Page Setup group, click the Dialog Box Launcher .

Page tab options

Orientation - Choose between landscape and portrait.


Scaling - Enlarges or reduces the worksheet or selection when you print so that it fits on the specified
number of pages.
Adjust to - When select Adjust to, you can enter a percentage in the % normal size box.
Fit to - When you select Fit to, you can enter a number in the page(s) wide by box and the tall box. To fill
the paper width and use as many pages as necessary, type 1 in the pages(s) wide by box and leave the tall
box blank.

124
Paper size - In this box, click Letter, A4, or other size options to indicate the size that you want to use for
your printed document or envelope.
Print quality - In this box, click a resolution to specify the print quality for the active worksheet. Resolution
is the number of dots per linear inch (dpi) that appear on the printed page. Higher resolution produces
better quality printing in printers that support high-resolution printing.
First page number - In this box, enter Auto to start numbering pages at "1" (if it is the first page of the print
job) or at the next sequential number (if it is not the first page of the print job). Enter a number to specify a
starting page number other than "1."
Margins tab options

Enter margin settings and see the results in the Preview box.
Top, Bottom, Left, Right - Adjust measurements in the Top, Bottom, Left, and Right boxes to specify the
distance between your data and the edge of the printed page.
Header or Footer - Enter a number in the Header box or the Footer box to adjust the distance between the
header and the top of the page or between the footer and the bottom of the page. The distance should be
smaller than the margin settings to prevent the header or footer from overlapping the data.
Center on page - Center the data on the page within the margins by selecting the Vertically check box, the
Horizontally check box, or both.

125
Insert Header and Footer

Header - Click a built-in header in the Header box or click Custom Header to create a custom header for the
worksheet that you want to print. The built-in header is copied to the Header dialog box, where you can
format or edit the selected header.
Footer - Click a built-in footer in the Footer box or click Custom Footer to create a custom footer for the
worksheet that you want to print. The built-in footer is copied to the Footer dialog box, where you can
format or edit the selected footer.
Different odd and even pages - Select the Different odd and even Pages check box to specify that the
headers and footers on odd-numbered pages should be different from those on even-numbered pages.
Different first page - Select the Different first page check box to remove headers and footers from or to
create custom headers and footers for the first printed page. To create a custom header or footer for the
first page, select this check box, click Custom Header or Custom Footer, and then on the First Page Header
or First Page Footer tab, you can add the header or footer information that you want to appear on the first
page.
Scale with document - Select the Scale with document check box to specify whether the headers and
footers should use the same font size and scaling as the worksheet. This check box is selected by default. To
make the font size and scaling of the headers or footers independent of the worksheet scaling to create a
consistent display across multiple pages, clear this check box.
Align with page margins - Select the Align with page margins check box to make sure that the header or
footer margin is aligned with the left and right margins of the worksheet. This check box is selected by
default. To set the left and right margins of the headers and footers to a specific value that is independent
of the left and right margins of the worksheet, clear this check box.

126
Set a print area and print titles (Gridlines, repeat rows/columns)

Print area - Click the Print area box to select a worksheet range to print, and then select worksheet areas
that you want to print. The Collapse Dialog button at the right end of this box temporarily moves the
dialog box so that you enter the range by selecting cells in the worksheet. After you finish, you can click the
button again to display the entire dialog box.
Print titles - Select an option under Print titles to print the same columns or rows as titles on every page of
a printed worksheet. Select Rows to repeat at top if you want specific rows as your horizontal title for each
page. Select Columns to repeat at left if you want vertical titles on each page. Then on the worksheet,
select a cell or cells in the title columns or rows you want. The Collapse Dialog button at the right end of
this box temporarily moves the dialog box so that you enter the range by selecting cells in the worksheet.
After you finish, you can click the button again to display the entire dialog box.
Print - Specifies what is printed from the worksheet, whether the printout is in color or black and white,
and what the print quality is.
Gridlines - Select the Gridlines check box to include worksheet gridlines in the printout. Gridlines are not
printed by default, regardless of whether they are displayed on the worksheet or not.
Black and white - Select the Black and white check box when you use a color printer but you want to use
black and white only when printing. This option is off by default. You do not have to select it when you are
using a printer that prints black and white only.
Draft quality - Select the Draft quality check box to print faster by using less print quality when the printer
that you use has a draft-quality mode. This option has no effect when the printer has no draft-quality
mode.
Row and column headings - Select the Row and column headings check box to include these headings in
the printout.
Comments and notes - In this box, select the location where you want annotations that you added to
worksheet cells to appear in the printout. Select At end of sheet to combine all annotations and print them
together on a page that is added at the end of the printout. Select As displayed on sheet to print the

127
annotations in their original location on the worksheet. Annotations are not automatically included in the
printout, because None is selected by default.
Cell errors as - In this box, select how you want cell errors that appear on the worksheet to be displayed in
the printout. By default, errors are displayed as they appear, but you cannot display them by selecting
<blank>, display them as a double hyphen by selecting --, or display them as #N/A.
Page order - Click Down, then over or Over, then down to control the order in which data is numbered and
printed when it does not fit on one page. The sample picture previews the direction your document will
print when you choose one of these options.

Guided Activity 5.6.1


Step 1: Open the data file GA 5.6.1 Print.xls from “Practical Spreadsheets_Your Name”. Work in the
Gauteng sheet.
Step 2. Select the File menu item to activate the backstage Print menu item.

Step 3: Change the page size to A4 by opening the dropdown arrow next to Letter.
Step 4: Change the page margin to Wide Margin by opening the dropdown arrow next to Normal Margins.
Step 5: Change the page orientation to Landscape Orientation by selecting the dropdown arrow next to
Portrait Orientation.
Step 6: To insert a header and footer, select the Page Setup link, just below the Settings area, to launch the
Page Setup window. In the Setup Window select the Header/Footer tab. In the dropdown menu for the
header select “Gauteng”. In the dropdown menu for the footer select “page 1 of ?”.
Step 7: To choose a print area, you have to close the Page Setup, and navigate out of the print window,
back to the Page Layout menu ribbon.
Step 8: Select cells A1 to M81, then select Set Print Area, under Print Area.

128
Step 9: To make sure that the heading is repeated on every page, select Print Titles on the Page Layout
ribbon to open the Page Setup window on the Sheet tab. Select the arrow next to the Rows to Repeat box,
a dialog will appear for you to highlight the rows that you want repeated. Select row 1. Repeat the same
procedure for the columns and select and select column A. You are now ready to print your list without the
total per year with repeated heading per page.
To make sure the layout is correct, choose Page Layout from the View tab.
Save and close the spreadsheet.
These activities should be attempted without guidance from the teacher.

Activity 5.6.1
Open the spreadsheet Act 5.6.1 from“Practical Spreadsheets_Your Name”
1. Work on the Free State sheet.
2. Select the Microsoft Print to PDF printer.
3. Print in portrait orientation.
4. Fit all the columns to one page.
5. Repeat the first row on all pages by opening Page Setup from the ribbon.
6. Print and then save the file as PrintAct5.6.1.pdf.
Save and close the spreadsheet.

Consolidation Activities
Activity 5.6.2
Open the spreadsheet Act 5.6.2 & 5.6.3 from your folder “Practical Spreadsheets_Your Name”. Work on
the Forecast sheet.
1. SORT THE DATA IN ALPHABETICAL ORDER ACCORDING TO THE NAMES OF CITIES.
2. Create a column graph with both values and names of cities.
3. Add the following to the graph:
• VALUE AXIS – DEGREES IN CELSIUS
• CATEGORY AXIS – SA CITIES
• Series – Min, Max
• Chart title - Temperature
4. Change the colour of the plot area to light yellow.
5. Create a new sheet called WeatherChart. Move the graph to this sheet.
SAVE AND CLOSE THE SPREADSHEET.

Activity 5.6.3
Open the spreadsheet Act 5.6.2 & 5.6.3 from your folder “Practical Spreadsheets_Your Name”. Work on
the GoldinAfrica sheet.

129
1. Calculate the total production of gold in Africa in cell H21.
2. Calculate the least amount produced by a country in cell H22.
3. Calculate the highest amount produced by a country in cell H23.
4. How many countries are producing gold? Display the answer in H24.
5. Calculate the Average Production to the nearest 2 decimal places in H25.
6. Determine how many countries produce more than 75 tonnes. Display the answer in HH26.
7. Use the data in cells A4:C18 to create a pie graph as follows:
a. Use appropriate heading, labels;
b. Move the legend to the right and make sure all countries are available;
c. Use a different colour for each country;
d. Add a new sheet called GoldSheet and move the graph there.

Save and close the spreadsheet.

REFERENCES
https://www.lifewire.com/column-definitions-excel-3123398
https://www.keynotesupport.com/excel-basics/excel-for-beginners-guide.shtml
Microsoft websites videos and tutorials
https://support.office.com/en-us/article/rows-columns-and-cells-bbd5c21c-a286-4886-887c-
842632eb4695?ui=en-US&rs=en-US&ad=US
Open Source websites videos and tutorials
https://www.youtube.com/watch?v=HcpaIuOLCqo
https://www.libreoffice.org/discover/calc/
https://www.lifewire.com/errors-in-excel-3123854
https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/introclientissues002.html
https://www.excelfrog.com/error
https://www.exceltactics.com/definitive-guide-excel-error-types-error-handling/
https://edu.gcfglobal.org/en/excel2016/page-layout-and-printing/1/
https://business.tutsplus.com/tutorials/format-excel-spreadsheet--cms-30160
https://www.dummies.com/software/for-seniors-how-to-format-an-entire-excel-worksheet/
https://support.office.com/en-us/article/page-setup-71c20d94-b13e-48fd-9800-cedd1fec6da3

130
Addendum A: Regional Settings
1. Search for Control Panel and open
2. Select Region button
3. This screen will appear

• Set the language to South African English


• Set the short date format to yyyy/MM/dd
• Set the long date format to dddd, dd MMMM yyyy
• Set short time and long time format
• Click on the Apply button

131
4. Click on the Additional Settings… button and this screen will appear:

• Note the decimal symbol is full stop: .


• List separator is comma : ,
• Set Measurement system to: Metric
• Click on Apply button

132
5. Click on the Currency tab and this screen will appear:

• Set the Currency symbol to: R


• Set the decimal symbol to full stop: .
• Click on Apply button

6. Click on OK button in each screen until you reach first screen.

133
CHAPTER 7: CODING
Chapter Overview

Unit 7.1 Variables


Introduction to Data Types
variables Variable names

Unit 7.2
Use variables in Scratch
Coding with variables

Unit 7.3 Operators


Operators & Expressions
Functions Functions
Chapter 7
Coding IF...THEN
Unit 7.4
IF...THEN...ELSE
Selection Structure
Conditions

FOREVER
Unit 7.5
FOR loop
Repetition Structure
REPEAT..UNTIL

Unit 7.6 Animation


and
Consoliddation Games

Prior Knowledge

Coding concepts from Grade 8

Computational Thinking

At the end of this chapter, you should be able to do the following:

• Explain what a variable is.


• Identify different data types.
• Name variables correctly.
• Use variables in a project
• Code a project by using the IF-THEN statement by using comparisons.
• Use different Mathematical and Text functions in a project
• Use sequence to solve simple numeric/mathematical problems
• Complete programs (code completion)
• Read and explain code

134
UNIT 7.1: INTRODUCTION TO VARIABLES
Introduction
In Grade 8 you have learned to code your first block-based project “Hello World.” You explored the simple
IF-
THEN statement, FOREVER loop, and conditional FOR loop. You also applied four techniques of problem
solving. In Grade 9 you will indulge more in coding activities. We will start with essential concept of
variables.

Variables are needed to run all but the simplest computer programs. As a program runs, it needs to hold
information in its memory. Variables allow us to store, change and access this information as the program
runs or executes.

What is a Variable?
Variable - Say it with me: Vayr-ee-ah-buhl

Imagine you are playing a game. Every time you win, you get a point that is added to your score.

A variable is used to store the score (value).

A variable is a name given to an area in the memory of the computer that may contain a value. It does not need
to contain a value, but if it does, this value may change according to circumstances.

A variable may only contain one


value at any specific time

Variables
What are variables?

A storage location for data (values)


in computer memory
The storage location can be used to
store a value

The storage location can be used to


retrieve a value

Examples:

Player_Name is the name of the


variable which contains the name of
a player typed in by the user.

135
Example 1

The size of the strawberry cannot be the same size at the same time. Either it is 4cm, 3cm, 2cm or 1cm. The
same applies to variables. A variable can only hold one value at a time.

In the next example, we will try to explain variables in a more practical way.

Example 2

Bafana Bafana and Brazil are playing a soccer game.

Before the game starts, the scoreboard shows the value of 2 variables, i.e., scoreBafana and scoreBrazil as
follows:

scoreBafana scoreBrazil

0 0

After 10 minutes Bafana Bafana scores a goal and the scoreboard changes as follows (The value of the
variable scoreBafana now changes to 1 as indicated below:

scoreBafana scoreBrazil

1 0

After another 15 minutes Bafana Bafana scores another goal, and the scoreboard changes as follows (The
value of the variable scoreBafana now changes to 2 as indicated below (the previous score is overwritten):

scoreBafana scoreBrazil

2 0

Just 5 minutes before the final whistle Brazil scores a goal and once more the scoreboard changes to the
final score (The value of the variable scoreBrazil now changes to 1 as indicated below:

scoreBafana scoreBrazil

2 1

The value of the variables called scoreBafana and scoreBrazil change when one of the teams scores a goal
and can only contain one value at any specific time.

By looking at the scoreboard at the end, there is no way that the previous score (previous values) can be
seen.

136
Guided Activity 7.1.1
You are provided with three cards. The cards have the following written on the front side:

Now, write the name, height, and purpose of your robot on the back of the different cards (in other words,
provide values, e.g. at the back of the robotName card, write a name for your robot, at the back of the
numUnitsTall card, write the height of your robot and at the back of the purpose card, write down what the
purpose of your robot is)
Complete the following sentences. (The three cards could be placed to complete the sentences. The
variable name is a placeholder for a value you wrote on the other side of the card).

After placing the cards with the variable names showing, turn the cards around to display the values that
you have written on the back of each card.

Swop your cards with the learner next to you. You will notice that he/she may have different values written
at the back of his/her card. However, the variable names at the front of the card are the same as yours.

We see that the front of the card will always stay the same and is called the variable name. The back of the
card can change, and this is the variable value.

Guided Activity 7.1.2


The following guided activity using a spreadsheet will assist you in clarifying variable names and values.

Open a blank workbook in a spreadsheet

Remember a worksheet has rows, columns, and cells. Each cell


has an address that is displayed in the name box. By default, A1
is in column A and row 1.

When you click on another cell, a different cell address will


show in the Name box. We will use the address as the variable
name.

Cell A1 → variable name A1

137
Type in your name in cell A1.
Now the cell has a value.
The value is your name. In our example it is Mpho.
We can say the variable A1 has a value “Mpho”

Select cell A1 again and type in your surname.


Can we use Johnson as your name? What happened?
The initial value of the cell A1 (Mpho) was replaced with your
surname (Johnson).

If we want to keep your name and be and be able to see your


surname, we need to make another variable for your surname.
Now type your name in cell A1 again, then type your surname
in cell B1.
Variable A1 now contains your name (the previous value
Johnson was replaced) and variable B1 now contains your
surname.
The above example is a practical explanation of how a variable
works.
The variable names are A1 and B1
When you typed in your name the value of the variable
changed to your name. The variable name remained A1. You can only store
Then you typed in your surname and your name was replaced one value at a time
by your surname. in a variable.

The value of the variable changed. But, the variable name You can change the
stayed the same. value as often as you
Then you changed the value of the variable A1 again when you want to.
retyped your name and you created another variable B1 with
your surname as the value

138
Activity 7.1.1
1. Watch the following video: Variables in Minecraft:
https://minecraft.makecode.com/courses/csintro/variables

2. Use the snippet of the spreadsheet provided below and answer the questions that follow:

Using the spreadsheet table provided

Follow the steps on the right from top to a. What is the cell name (variable name) for the value
bottom in sequence they are presented: Mouse?
Answer the questions. b. What is the cell name (variable name) for the value
iPad?

c. What is the value of A5?


d. What will the variable value be of the Keyboard if B7 is
changed to 40. Motivate.

e. Name the cell names (variables/boxes) that contain


values greater than 15?
f. Name the cell values (variables/boxes) that contain
values greater than 15?

g. Explain the difference between the answers obtained in


step 5 and step 6

139
Data types of a variables
A variable refers to a memory location that can store data of a particular type.
Do you want the computer to do calculations with the variables?

This is an important question, as it could guide you in selecting the correct type of variable for the data. For
example, the computer does not need to make any calculations with your telephone number. Therefore, it
could be saved as text. A text field will also not drop the 0 (first character of a number) e.g. ‘0758829999’
in a text field versus 758829999 in a number field.
In Scratch, you will work with the following three data types namely, Text, Number, and Boolean.

Data Types Descriptions Examples


Text Text is made up of a sequence of numbers, ‘P@ssword’
letters, and symbols.
‘True’
A text can contain anything from a single
‘The brown fox jumps over the fence’
character to multiple characters.
‘123’

Number A number can be an integer or a real Integer: Real


number. You can perform numerical
100 12.3
calculations on both integer and real
numbers. -5 -1.0

An integer number can contain any positive 12435


or negative number without a decimal point
(a whole number).
A real number is a positive or negative
decimal number.

Boolean A Boolean value can only be one of two True


values – it can be TRUE, or it can be FALSE.
False
This is often used in programs where a
specific task is only completed if a specific
condition is met.
It is often the outcome of a condition, e.g.
A > B? (true or false?)

Note
In Scratch, you do not have to indicate what type of data the variable will store. Scratch automatically sees
it as a Text or a Number. But other programming languages require that a variable must be declared to be
of a certain type.

140
Activity 7.1.2

Picture A Picture B Picture C Picture D

NOTE: each box/container can only contain/hold one value at a time.

Referring to Guided Activity 7.1.2, let’s say each memory location is represented by a container/box:

• For the purpose of this activity, a box/container can only store one piece of data (value) at a time.

• You can store data (values) inside that box (memory location). You can place data inside the
container, and you can use that data any time by referring to the memory location (variable name).

• The container always stays in the same place. The computer assigns a memory address or memory
location to this container. The memory address or memory location will always stay the same.

• In Guided Activity 7.1.2, you typed in your name and when you type in your surname it replaced
your name.

• The value inside the container can change, but the name of the container stays the same.

• Also, remember that a container can only store ONE value at a time – if a new value is assigned to
the container, the value that was there before, is overwritten or replaced.
Complete the following table for each of the boxes above:

Data type that is associated with this Value in the box/ value of the
variable variable

Picture A Integer 4

Picture B

Picture C

Picture D

141
Activity 7.1.3
Complete the following table:

Questions Your answer Name the Motivate


type of the
variable.
A mobile number 0821234567 text The number starts with 0 and the 0
0821234567 was stated on will be dropped if it is of type
the application form. number as a 0 in front of a number
is meaningless
What is your first name?

What was the rainfall


measured yesterday?
What is your heart rate during
training?
What is the number of
cheeseburgers consumed in
an hour?

Let us now look at good programming conventions for variable names.

Variable Names
To ensure good programming practices, names of variables are selected according to certain naming
conventions. A naming convention is mainly used so that programmers understand each other’s code.

Scratch is not very strict on variable names and will run on almost any variable name you give to it. Other
programming languages are much stricter with variable names. It is a good practice starting with naming
variables correctly and applying the correct rules from the start.

Generally, conventions for variables are as follows: Conventions


1. Variable names describe the data they will contain. For example: Variable name: “Amount” will
contain numbers
2. Variables names start with a single letter prefix describing the data type of the variable, e.g.
iNumber.
3. Variable names use CamelCase. This means the first letter is lowercase and each word thereafter
starts with an uppercase, for example, tNameSurname.

4. All variable names must be unique. Two variables cannot have the same name. It will confuse the
memory of the computer. A computer is not as clever as you think it is.

5. Variable names may not contain any spaces, for example “My Name” is an incorrect variable
name, but tMyName would be correct.

6. Variable names may not start with numbers but may contain numbers, for example “12Names” is
incorrect, but “Names12” would be correct.
7. Variable names may not contain any special characters (!,@,#,$,%,^ etc.) except for underscore (_), for
example “Name&Surname” will be incorrect, while “Name_Surname” will be correct.

142
Examples

Examples of INVALID variable names Examples of VALID variable names


• 123 • MyValue
• 1Value • Value1
• My Value • My_Value
• My-Value • _Value
• My%Value • Val123
• _123

Here are some good examples of a common practice that programmers use:

Data type Prefix Variable name using the prefix


Text t for text tName
Number
• Integer (whole) i for integer iTotalAmount
numbers
• Real numbers (decimal r for real rAmountPaid
values)

We often use the Boolean data type when we use conditions, e.g. Is Number1 > Number2? A Boolean data
type can only be True or False (0 or 1). For example, when we need to determine if two numbers are equal
(iNumber1 = iNumber2), the result can either be True or False. When the numbers are the same the result
will be True, if not, the result will be False.

Activity 7.1.4
Complete the following table:

Description Data type Variable name Motivate


(apply the rules)
Job description of an
Text tJobDescription The variable will only contain letters.
employee
Course code of student
Name of company
Distance to travel
Salary of manager
Type of animal
Name of student
Number of pens
Outcome of a question
or comparison to see if
number of hours worked
is more than normal
number of hours

143
Activity 7.1.5
An application form for a new job is provided. You will be requested to write a program that captures the
data on the form for all the applicants.

Use the table below and identify the different variables that you will use. Provide the expected variable
type for the variable. Use good programming principles when choosing the variable names.

Name of Variable Variable type

Activity 7.1.6
1. In your own words, define the word ‘variable’ as it relates to computer programming.

2. What is the purpose of a variable name?

3. What is the difference between an integer and a real number?

4. Which of the following statements are FALSE about variables?


4.1 A variable must have a type

4.2 A variable can store more than one value at a time

4.3 A variable must have a name.

4.4 If a variable of a number type stores a mobile phone number, the 0 in the front will be dropped
5. Which of the following statements are TRUE about variables?

5.1 A variable is a location in computer memory.

5.2 Boolean variables can hold values that are either true or false.

144
5.3 Declaring a variable name should indicate what type of data the variable would hold.
6. Which of the following statements are TRUE regarding variable names?

6.1 A variable name must be unique

6.2 A variable name can start with a number

6.3 A variable name can contain a space

6.4 A variable name can contain a number

7. A text variable could be described as…

7.1 A type of variables that holds data values made up of characters, e.g. a password such as li@GXyp%.

7.2 A variable type that holds only one character to indicate gender e.g. F or M

7.3 A type of variable that holds ID numbers.

7.4 Memory location that stores data that can be used at a later stage

8. Determine if the following statements are true or false. If false, correct the statement to be true.

8.1 A variable of the type, text can store a single character.

8.2 A variable of the type, integer can store a real number.

8.3 A variable of the type, real can store an integer number.

8.4 A variable of the type, text can store values that contain special characters such as ‘*’.

8.5 A variable of the type, Boolean can only store one of two values. True or False.

8.6 It is better to store a mobile phone number as a text variable

9. Write down the data type for each of the following:

9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8

Peter 5 & 7,5 TRUE 007 FALSE 12t34

10. State if the following variable names are correct.

IF not correct give a reason why the variable name is incorrect:

10.1 10.2 10.3 10.4

2Name MyName My Surname iNumber

10.5 10.6 10.7 10.8

TRUE True & False bTrue Name2

145
UNIT 7.2: CODING WITH VARIABLES
Introduction
In the previous unit, you learned about variables and naming conventions. In this unit, you will learn how to
use variables in solving coding problems. We will start off by playing a game.

Play a Game (Unplugged)


A computer always receives some sort of input, the computer processes the input, and lastly, the computer
will show the output.
From:(https://minecraft.makecode.com/courses/csintro/variables/unplugged)

Processing Output
Input (e.g. computer
(e.g. computer
(e.g. user types in uses the number
displays the result
a number) to calculate
of the calculation)
something)

Introduction:
1. There are three variables:

a. Slap (player slaps his/her thighs or the desk)

b. Clap (player claps his/her hands)


Snap (player snaps his/her fingers)

2. The teacher assigns values to each of these movements using variables, and then the players work
together to try to show those values to the rest of the class.
3. Each of these movements takes a number that tells the player how many times to slap, clap, or
snap.

Materials:

• Whiteboard

• Index cards or paper

• Play it
The computer metaphor:

In each round, two learners will become the computer.


1. One learner will fetch the stored information from memory.

2. The other learner outputs the stored numbers for everyone to see.

The procedure
1. Demonstrate the three different movements in order: slap, clap, and snap.

2. Write the above order on the board.

146
3. Split the class up into teams.

4. One learner from each team will sit with an index card turned upside down near them.

a. They will need to reach for this, so make it convenient.

b. The index card or paper will have three numbers on it.

i. the first number is the number of slaps,


ii. the second is the number of claps, and

iii. the third is the number of snaps.

5. Another learner will be at the whiteboard ready to write.

6. When the teacher says “Go”


a. The three variables are shown.

b. The learner in the chair performs the action.

c. The person at the board writes down the numbers as they watch the teammate in the chair
perform them.
d. The learner at the board does not get to see the index card. This is a relay race.
The Winning Team:

1. The first team to finish correctly wins.


2. Alternatively, you can play several rounds or to a set victory number.
Example:
To keep gameplay balanced, teams should have the same total number of actions. This will take a little
preplanning but will ensure that the game is fair.
For example, assume you have three teams. Their first cards with the three variables might look like this:
Team 1 Team 2 Team e
Slaps 2 1 4
Claps 1 4 1
Snaps 4 2 2

The number of slaps, claps, and snaps for each team is different, BUT they are all performing a total of
seven actions, so it is relatively fair. Also, because the actions are varied like this, nobody can cheat by
looking at another team.
Variations:

1. Change the order of the actions from slap, clap, and snap TO clap, snap, and slap.

2. Let learners suggest different movements to add to the slap, clap, and snap sequence. They can
then add another variable.

147
Use Variables in Scratch
A variable has a specific name that describes the value that the variable contains. Each variable is a
placeholder for a value with a specific type. The type could be either, Text, Integer, or Boolean.

Guided Activity 7.2.1


Following the step-by-step guide to complete this activity using Scratch programming.

Open Scratch. You can change the Sprite and Backdrop to your choice.

1. Select the “Variable” Blocks and the following will


appear.

• Make a Variable: Here you will define your


variables.

(You are not going to use lists in Grade 9. If you


continue with programming beyond Grade 9, you will
learn about lists (arrays))

2. Select the “Make a variable” block and the


following screen will appear:

• Type “tName” as a variable name in as the new


variable name,

• Select “For this sprite only.” You will only use


the variable on the selected Sprite.

3. In the stage area on the left top you will see the
following appears. At this stage, the value of
tNames is “0” (zero).

• You will notice the Sprite name (Sprite1) is


displayed in front of the variable. This is
because you selected “For this sprite only.” The
variable “tName” will only apply to Sprite1. In
programming we call it a local variable.

We will now start with the coding and drag it to the Script area.

1. Select the Block and drag the “ask” block


to the Script area.

148
2. Now add the following blocks to your Script area

by using the Blocks and Blocks.

The asks a question and stores the input from the keyboard and assigned to
the tName variable.

3. Run the project and see how the script acts out.

3.1. The Sprite will ask you your name and you will
have the opportunity to type in your name or
any other name for that matter.

3.2. Type in your name and press enter to proceed


with the script.

3.3. Look how the variables tName changed from


“0” to “Peter”.

3.4. And the name is displayed.

149
4. Run the Script again. Use “Kgosi” as a name.

4.1. After you entered the new name see how the
value of the variable tName changes to
“Kgosi.” “Peter” has now been replaced and is
nowhere to find in the computer’s memory

Watch the following videos to enhance your https://youtu.be/JPeGqzX9eUI


understanding about making variables in Scratch:
https://youtu.be/aMYdxqsQNBA

(If you want to learn about lists, you can


watch the following videos:

https://youtu.be/1rb226XBBMo

https://youtu.be/4HWpjKp6G-Y)

The Input-Processing-Output (IPO)-Table


It is a good practice to use an Input-Processing-Output table (IPO table) when planning to write a program.
It is a tool that helps us to better understand a given problem. An IPO table is an effective way to model the
important processing in your software solution. Input refers to data that is required to create the required
outputs. The process involves the steps in creating different output from the different input.

Example 1
Problem: Input your name and display the variable. Use Peter as the name.

Before creating an IPO ask yourself the following questions:

Question Answer

1. What input is needed? A name.

2. What processing must take place? The name must be assigned to a TEXT variable.

3. What must be displayed? The name entered by the user

150
Input – Processing – Output table (IPO TABLE)

Input: Processing: Output;

The user inputs his/her name Assign the name to a variable The user’s name is displayed.
of data type TEXT.

Scratch code for the IPO table above:

• In the Input column, your name is asked, so you need to create a variable to hold the name

• The processing part requires you to assign the name that the user enters to the variable

• The output part requires the code to display the name.

Guided Activity 7.2.2


Problem: Write a Scratch project to display two numbers.

Before you start coding you need to create an IPO table. Remember to ask yourself the following questions:

Question Answer

1. What input is needed? An integer and a real number

2. What processing must take place? One number must be assigned to an INTEGER
variable.

One number must be assigned to a REAL variable.

3. What must be displayed? The integer number entered by the user.


The real number entered by the user.

IPO table

INPUT PROCESSING OUTPUT

The user inputs an integer Assign the first number to a data type of The integer
number INTEGER. number

The user inputs a real number Assign the second number to a data type of The real number
REAL.

151
Coding in Scratch

Create a new project in Scratch

1. Create the two variables in Scratch.

2. Look at the IPO table and start coding:


2.1. The first Ask-block displays an instruction: “Enter an
Integer value.” If no question or instruction is given the
user will not know what is expected of him/her.

2.2. The Set-block takes the answer entered and assigns it to


the variable iNumber.

2.3. The second Ask-block displays an instruction: “Enter a


Real number.”

2.4. The Set-block takes the answer entered and assigns it to


the variable rNumber.

3. The first Say-block displays the integer number.

The second Say-block displays the real number.

4. Run the coding and enter


the two numbers (We
used 10 and 5.5).

152
Guided Activity 7.2.3
Problem: The computer must ask for the name of the surname and the name and surname must be
displayed.

Before you start coding you need to create an IPO table. Remember to ask yourself the following questions:

Question Answer

1. What input is needed? A name and a surname.

2. What processing must take place? The name must be assigned to a TEXT variable.

The surname must be assigned to a TEXT variable.

3. What must be displayed? The name entered by the user.


The surname entered by the user.

IPO table

Input Processing Output

The user inputs his/her name. Assign the name to a data type of TEXT The user’s name
The user inputs his/her surname. Assign the surname to a data type of The users’s surname.
TEXT.

Coding in Scratch

Create a Scratch project.

1. Declare the two Text variables: tName and


tSurname. We use “t” in front to remind
ourselves that we work with data type of TEXT.

2. Add the following code to ask for the user’s


name and ask the user’s surname

153
3. Add the Join function to your code:

Function Description and Examples

Join Joins two strings (text)

4. Stop and run the project.

• Notice that there is no space between the


name and surname.

5. Change the code to include a space between


the name and surname. Remember to add a
space inside the empty place in the join
function.

6. Run the project again.

154
Activity 7.2.1
1. Create an IPO table before coding and then code the following problems.

1.1. Enter your favourite TV program and display your favourite TV program:

1.2. Write a program to add and display two sentences

Sentence 1: “Life is an art of drawing”


Sentence 2: “without an eraser”

1.3. Create a username and a 4-pin number. Display both the username and pin number.

Activity 7.2.2: Challenge


1. Write a program to display your first initial and surname. The user needs to type in his/her first name
and not just the initial

2. Write a program to enter two numbers.

Display the two numbers.

Swop the two numbers around.

Display the two numbers (now swopped around)

Tip: You need a 3rd variable to serve as a placeholder.


Note: You cannot just change the code for the output by swopping the variables.

155
UNIT 7.3 OPERATORS AND FUNCTIONS
Computers are very good at doing calculations. Programming languages come with logical and arithmetic
operators. We use arithmetic operators to do calculations. Logical operators are used to do comparisons
between two or more values.

Operators in Scratch
Scratch allows us to add, subtract, multiply, and divide. The following table explains the different operators
used in Scratch.

Name Scratch operator Description Example


Addition Add two values

Subtraction Subtract two values

Multiplication Multiplies two values

Division Divides two values

Integer Divides the first number by the


Division second number, then keeps only the
remainder.
The answer will always be an Integer

Imagine you have 5 blocks.


How many times can 5 blocks be
divided between 3 people?
You can take 3 blocks and give each
person one block, but then there will
not be enough blocks to give each of
the three people another block as
there is only two left.
So the 2 blocks that remain is called
the remainder

156
We can illustrate the mod-operator with the following blocks:
Group of 3 Remainder

Example Description
Imagine you have 6 blocks and want to divide it between 2 people.
How many blocks will each person receive?
How many blocks will remain?
Each person will get 3 blocks and there will be no blocks left.

Study the following example:


Expressions Answers Scratch Expressions Answers Scratch
70 + 30 100 35 – 5 30

2*2 4 12 / 5 2.4

25 mod 20 5 14 mod 12 2

6 mod 3 0

157
Activity 7.3.1
1. Evaluate the expressions below
1.1 1.2 1.3
8+7 9 mod 5 2*9

1.4 1.5 1.6


12 mod 6 14 mod 10 97 / 3

Order of Precedence
When we mathematical expressions, they need to be evaluated using the BODMAS rule – just as you would
do in Mathematics. We refer to this as the order of precedence – the order in which the operations must
be carried out.

When presented with a number sentence containing more than one operation (such as 3 + 4 x 2), the
operations cannot be completed from left to right, but instead in their order of “importance”, which is what
BODMAS stands for.

BODMAS is an acronym to help children to remember the order of operations in calculations. It stands for,
‘Brackets, Order, Division, Multiplication, Addition, Subtraction.’ Orders” means square roots and indices
(which you may know as square numbers, powers, or exponents).

The table below lists the order of precedence used in Scratch programming

Operator Precedence

() Highest level

* / mod Second level – from left to right – whichever one comes first

+ - Third level – from left to right – whichever one comes first

158
Apply the precedence rules to build expressions in Scratch.

Calculation Level Scratch block Calculation Level Scratch block

2 + 3 * 10 Multiplication (2 + 3) * 10 Backets first


comes first as as this has the
it is on the highest
second level precedence
of precedence

= 2 + 30 Then comes = 5 * 10 Then


the addition multiplication
follows

Expression
in Scratch

The answers are different to the above calculations. Due to the order of precedence, the answers are
different. Notice the difference in the expressions in Scratch how the blocks are packed.

Important: Note that only one calculation is done per line to clearly indicate the sequence of priorities in
which the computer will execute the statement, and in each case, the result is underlined to indicate the
answer of the previous calculation.

Activity 7.3.2
1. Evaluate the expressions below

1.1 1.2 1.3


4*6/2 3+4*6 (3 + 4) * 6

1.4 1.5 1.6


12 + 4 mod 2 12 + (4 mod 2) (6 mod 3) - (10 mod 3)

2. Evaluate the expressions (Up for a challenge)

8 * 4 – 7 mod 2 + 3

159
Calculations using Variables
In the previous units, you learned about variables and how to use them in Scratch. In the following
example, we will use variables to do some calculations based on real-life situations.

Example
You want to tile 2 rooms. You need to calculate how many boxes of tiles you need for each room. Each box
contains five tiles.
When you want to solve a problem, it is always a good practice to divide it into smaller parts.
The first step is to calculate the area of the one room.

Room 1 Room 2

If you look at the above table, you will notice there are three variables (Length, Width, and Total Area).

Now, let us create an expression to calculate the total area of each room.

Room 1 Room 2
Total Area = Length * Width Total Area = Length * Width
= 10 m * 5 m = 7m*3m
= 50 m2 = 21 m2

The next step is to determine how many boxes of tiles each room needs.
Room 1 Room 2
Boxes = Total Area / Tiles in box Boxes = Total Area / Tiles in box
= 50 m2 / 5 tiles = 21 m2 / 5 tiles
= 10 boxes = 4.2 boxes
Thus: 5 boxes

In this instance we will use the Ceiling-function in


Scratch to get 5 boxes:

(you will learn about functions later in this unit)

Let us now look at the problem-solving process for the above problem:

160
Guided Activity 7.3.1
Problem:
You want to tile 2 rooms. You need to calculate how many boxes of tiles you need for each room.
Each box contains five tiles.
Before you start coding, you need to create a flowchart. Remember to ask yourself the following questions:
Question Answer
1. What input is needed? The length of the room.
The width of the room.
2. What processing must take place? Calculate the area of the room
Calculate the number of boxes needed
3. What must be displayed? The area of the room
The number of boxes needed

Flowchart

161
Coding in Scratch
Create a new project in Scratch
1. Create the variables you need in Scratch.

2. Use the flowchart to assist you with the coding:

Run the coding and enter the length and the width
of room 1.
Length: 10
Width: 5

Run the code again with different values. Although you use different values each time you run the code
the variable names stay the same.

162
Example
The school is hosting sports matches on Saturday. You were asked to do some research on where you will
get the best price for potatoes to make the most profit in selling chips. You visited two supermarkets and
the following prices are obtained.

Determine, by showing all calculations, which supermarket will be the best value for money.

Supermarket A Supermarket B

Cost = R / kg Cost = R / kg
= R20 / 4.5kg = R8 / 1.8 kg
= R4.44 per kg = R4.44 per kg

The potatoes cost the same at both Supermarkets.


The Scratch program for the above example could look like this:

Output for the cost of potatoes per kg for Shop1 and


Shop 2 is:

We see that per kg, potatoes cost the same at both


shops.

163
Activity 7.3.3
1. Convert the following flowchart to code in Scratch. Ketara spends 65% of the money she earns each
month and saves the balance. If she earns R5000 per month, how much did she save for 3 months?

2. Write a Scratch code to solve each of the following problems. Create a flowchart before you do the coding
in Scratch.
2.1. You want to meet your friend at a coffee shop for a cup of coffee. You travel 15km at a speed of
60km/h. Your friend travels at 50km/h and stays 10km from the coffee shop. Who will arrive first at
the coffee shop?
Use the following formula: Travel time = (Distance / Speed) * 60 min
Note: You must run the program two times to determine who arrived 1st at the coffee shop
2.2. Janice borrowed a few books from the local library but has forgotten to return the books on time.
She will supply you with the number of books as well as the number of weeks that her books are
late. She must pay a fine of 50 cents per week per book. Display on the computer screen how much
she will have to pay when she returns the books.

164
Functions
A Function is when a section of the program performs a specific task. A function takes data as input (this can
be more than one value), process the data and finally produces the result (this result is always only one vale).
You already used the SUM function on Excel. Let us first do the SUM function again in Excel try to explain
how a function works.

Guided Activity 7.3.2


1. Create the following
datasheet in Excel

2. Select Cell B3 and type in


the SUM function.
Remember the = sign.
Notice “number1” and
“number 2” – this is the
input variable.
3. Complete the SUM
function.
B1 and B2 is the input data.
4. Press <Enter>
The function does it
processing to calculate the
result.
The result is displayed.

A function is diagrammatically illustrated like this:

Value 1

FUNCTION Result
Value 2

165
Function Description and Examples
Length of Calculates the length of a string (text)
The function
counts the
spaces.

Letter of Displays one character in the sentence.

Random You want to generate an integer number between two specified ranges.

Notice the bottom range is 1 and the upper range is 10. The computer
includes the bottom and upper range when choosing a random number.
The random function only produces whole numbers in Scratch.
Square Root Calculates the square root of a number.

Absolute Converts a negative number to a positive number.

Exponent

Round Converts a real number to the nearest integer (whole) number.

166
Floor Converts a real number to the bottom range of the integer (whole) number.

Notice this function does not produce the same result as a Round function.
Ceiling Converts a real number to the upper range of the integer number.

Notice this function does not produce the same result as a Round function.

Guided Activity 7.3.3


1. Remember, previously in the unit, when we calculated the number of boxes, we need to tile a room. The
second room we calculated that we need 4.2 boxes. A tile shop will not sell to you only a part of a box.
You will have to pay for the full box.
Open the Scratch project for calculating the tiles and change the code as follow:

Run the code and enter the values for the second room

Although the variable value of rNumBoxes is 4.2 in the memory of the


computer, the output is 5. We only applied the function in the output,
and we never changed the value saved in the computer’s memory.

167
2. In the following guided activity, we will display the sentence “I like coding in Scratch”
Create a Scratch project.

1. Declare the following variables:

The variables are two text variables and one


numeric variable.

2. Add the following code. If you type in the


sentence in the set block, then the Sprite does
not need to ask what the sentence is.

3. Add the following block to the code. This is to


ensure that the text variable tAddLetter starts
with an empty sentence.

4. Add the next block. This block is used to make


sure the program starts at the first letter of the
sentence.

5. Add the next set of blocks.

a. The length of function is used to count the


length of the sentence.
The Repeat Loop is used to ensure that the
whole sentence will be displayed.

b. The Join function is used to add each letter to


the variable tAddLetter.
The iCount will determine the position of the
letter. Each time the loop repeats the value of
iCount changes by one.

6. Code and run the project and see how the


sentence is displayed like a typewriter.

168
Activity 7.3.4
1. Create code to do the following:
Problem Block Answer Resulting data
type
Example Calculate the square root of 100. 10 Integer

1.1. Select a Random number between


50 and 60 (excluding 60)
1.2. Round the number 13.45
1.3. What is the floor value of 13.45?
1.4. What is the ceiling value of 13.45?
1.5. What is the absolute value of
-123 number?

2. Create Scratch projects for the following problems.


2.1. Enter your first name and surname.
2.1.1.Display only the initial of your name.
2.1.2.Display the length of your surname.

2.2. Enter two integer numbers. Divide the first number by the second number, then display the
remainder.

2.3. Determine the square root of a real number, then round the result.

2.4. Calculate the product of one randomly generated whole number between 1 and 10, and one
randomly generated real number between 0 and 1.

Tip: Use in generating a real number between 0 and 1.

169
3. The following questions provide a problem statement and either an IPO table or a flowchart.
Create Scratch projects for each problem.

3.1. ABC school is taking learners on an excursion. They approach a bus company for a quotation. They
confirm that they have 20-seater buses and that the cost for hiring one bus is R2500. Enter the
number of learners that will go on the excursion. Determine the number of buses required and the
total cost of hiring the buses.

2.2 Tommy’s bank allows him to earn points each month depending on the amount of money he
spends. For every R500 he spends, he receives 5 points. Create a Scratch project to read the
amount of money he spent in a particular month and calculate the points he has earned for that
month. Display the points earned. The bank does not allow Tommy to get half a point. The point
must then be converted to the next whole number.
Input Processing Output
Enter the money spent Calculate the points Display the points earned.
Points  Money spend / 5 / 100

170
4. A litre of milk used to cost R10.50. It now costs R12.00. Determine the percentage increase in the price.
How to Calculate Percentage Increase
• Subtract the old price from the new price
• Divide that difference by the absolute
value of the old price
• Multiply by 100 to get the percentage
increase

171
UNIT 7.4 SELECTION STRUCTURE
In Chapter 4, you learned that when you solve a problem, you mostly work with the following structures:

Sequence Selection Repetition

How many times

(Discussed in next Unit)

Loops also ask questions, but ask


the question over-and-over
A series of actions are performed in a There is sometimes more than again and
specific order, the first action first, one path to follow, and we need perform
then the second to ask a actions
action, then the question to over-and-
next action until decide over until
the last action. which path the
to follow condition is
satisfied

These structures also apply to programming. However, up to now, you have mostly coded sequentially.

In this chapter, you will learn that the computer can select different paths (branches) depending on the
outcome of a condition.

You need to make choices daily. Think about the decisions you made this morning:
• When the alarm went off – you had to decide whether you are going to press the snooze button
and sleep a little more whether you are going to press the stop button and get up.
• You might also have decided, after looking at the weather forecast, whether you would put on a
jersey or not before going to school.

Decisions are also required when programming.

What is a Selection Structure?


A selection structure, also known as a conditional structure, is a programming control structure that
performs different processes based on whether a Boolean condition is true or false.

Selection structures use relational operators to test conditions.

172
The IF-THEN Statement
The IF…THEN statement is a conditional structure. Condition
It needs to evaluate a condition (ask a question) to decide
which instruction(s) need to be executed next.

Activity 7.4.1
Watch the following video and answer the questions that follow:
https://www.youtube.com/watch?v=ek4swHmE2Yk

1. Write down the condition of the IF-THEN


statement.

2. When will the cat say “Hello”?


3. When will the cat say “Bye”?

4. What will the output be if the condition is true?

5. Explain your answer in 4.

When the condition is evaluated, the result of the condition is always a Boolean value i.e. true or false.

The IF…THEN- statement can be represented in a flowchart as follows:

If the condition is TRUE, Block A is executed and moves on to execute Block B. If the condition is FALSE, Block
A is skipped, and Block B will be executed.

173
Relational Operators

When coding, one uses relational and logical operators to describe a condition. There are four basic
relational operators in Scratch:
Name Scratch operator Description Example
Equal To determine if two values are
equal

Less than To determine if the first value is


smaller than the second value

Greater than To determine if the first value is


greater than the second value

NOT Converts a true to false or a


false to true.

The outcome of a relational operator is a Boolean value: It is either TRUE or FALSE


More Examples
Expressions Answers Scratch Expressions Answers Scratch
70 > 30 True 25 > 35 False

15 = 15 True 14 = 15 False

25 < 70 True 40 < 33 False

174
Guided Activity 7.4.1
Determine whether a number is odd or even. When an even number is divided by 2, it does not have a
remainder. When an odd number is divided by 2, it has a remainder of 1.
IPO table
Input Processing Output
Read number Calculate the remainder Display message
Remainder = Number mod 2
Check if the remainder = 0
Check if the remainder = 1

Algorithm and Flowchart

Algorithm Flowchart

1. Read Number

2. Remainder = Number mod 2

3. If Remainder = 0 then

4. Display number is even

5. If Remainder = 1 then

6. Display number is odd

Code in Scratch

175
Activity 7.4.2
1. Indicate if the expressions are True or False.
1.1 1.2 1.3
8>7 9<5 2=9

1.4 1.5 1.6


12 = 12 14 > 10 97 < 3

Remember

2. Determine the output of the following coding statements:

2.1. Input = “John”

2.2.

176
3. A customer is awarded points when using a loyalty card. The store decides double all its customers’
points. Those customers who have points greater than 2500 before the points are doubled will be
awarded an additional 500 points.

Study the flowchart and answer the questions that follow:

3.1. If Box 4 is moved immediately below Box 1, will the algorithm still produce the same result if the
points entered are 1000? Explain your answer.
3.2. If Box 4 is moved immediately above Box 1, will the algorithm still produce the same result if the
points entered is 3000? Explain your answer.

3.3. What will happen if Box 3 and Box 4 are interchanged.

4. In a guessing game, a player guesses a number between 50 and 100. The computer displays the
winning number.

If the number is correct, a message must be displayed “Great guess!”

If the number is incorrect, a message must be displayed “Wrong guess.”


4.1. Create a flowchart.

4.2. Code the project.


5. Determine if the second number is greater than the first number.,

5.1. Create an IPO- table

5.2. Code the project.

177
The IF-THEN-ELSE Statement
Sometimes you want something to happen if a condition is met, and something else to happen when a
condition is not met. You can then use the IF…THEN…ELSE conditional structure.

IF the outcome of the condition is TRUE – the coding blocks in the THEN-part will be
executed.
IF the outcome of the condition is FALSE – the coding blocks in the ELSE-part will be
executed.

Activity 7.4.3
Watch the following video and answer the questions that follow.

https://www.youtube.com/watch?v=Q553s_qTYgk

1. What will be displayed if the outcome of the condition is


FALSE?

2. Explain in your own words how the IF-THEN-ELSE control


structure works.

Guided Activity 7.4.2


In the following project, we want to check if the password (P@55worD) is correct. If the password is correct
a message must appear: “Proceed!”. If the password is incorrect a message must appear “STOP. Wrong
password!”

Open a new project in Scratch.

1. The diamond represents a decision based on a


condition.

In this situation, the program must check if the


password is correct.

2. Make two variables: Password and


DefaultPassword.

3. Do the following coding

178
Pseudo Code
Begin
Set DefaultPassword
Get Password
tPassword  Password
If tPassword = tDefaultPassword then
Display “Proceed!”
else
Display “STOP! Wrong Password!”
endif
End.

4. Run the program.

Activity 7.4.4
1. Study the IPO table below:

Input Processing Output

Get Mark Mark >= 30? Mark >= 30 → Display ‘Pass’

Else display ‘Fail’

Convert the IPO table into a flowchart.


2. Write a pseudocode for the following problems:
2.1. The variable years contains the number of years that an employee has worked for a company. An
employee who has worked for at least 5 years earns R300 per day, while an employee who has
been in service for fewer than 5 years only earns R250 per day.
2.2. Calculate the amount a student must pay for making copies of notes. If more than 100 copies are
made, the price will be 18 cents per page; otherwise, the price is 20c per page. Display the final
amount in Rand.
2.3. An employee receives an increase of 5.8% if his/her salary is R3900 or less. Enter the current salary
of the employee and if the employee qualifies for an increase, calculate and show the new salary
on the screen.
3. A customer bought some groceries, and the amount payable is stored in the variable named
payAmount. If the amount exceeds R250, a discount of 5% applies, but if it is less the discount is only
2.5%.
Correct the algorithm
if payAmount > 250 then
payAmount = payAmount * 0.95 ~ 5% discount applies
else
payAmount = payAmount * 0.975 ~ 2.5% discount applies
endif

179
4. A password you create must have an Asterix “*” as the last character of the password. Write a program
to determine the password that contains an Asterix “*” as the last character.
Display the message “Password is acceptable” if the password contains an asterix in the last position
and If the Asterix “*” is not the last character of the password, display the sentence “Password is not
acceptable”
Implement the algorithm in Scratch.
5. Several children go to the circus. The price of a ticket is R25, but if a group of more than 20 children
buys tickets, the price is only R18 per ticket. Enter the number of children. Calculate and display the
total amount for all the tickets. Draw an IPO table. Write the code
6. Jenny wants to buy a packet of chips for every child in the playgroup. The salesperson at the shop tells
her how many packets are in stock. Enter the number of children, the number of packets in stock, and
the selling price of a packet. If the shop has a packet for every child, calculate and display the amount
due on the screen. If there are not enough packets, Jenny is not going to buy anything, and no message
is displayed.
6.1. Draw a flow chart.
6.2. Write the code.
7. Solve the following problem. Firstly, create an IPO table for the problem, and secondly represent the
problem using a flowchart.

To determine if one is overweight, on can calculate one’s Body Mass Index (BMI)
𝑊𝑒𝑖𝑔𝑡ℎ (𝑘𝑔)
BMI is calculated through the following formula: 𝐵𝑀𝐼 = [𝐻𝑒𝑖𝑔ℎ𝑡 (𝑚)]2

If one’s BMI is greater than 23, one is regarded as overweight

Get a person’s weight (in kg) and height (in m), then determine if the person is overweight or not.
Display a message to that will inform a person if he/she needs to lose weight or not.

Use the flowchart representation and implement the solution in Scratch.

180
UNIT 7.5 REPETITION STRUCTURES
In Grade 8 you have learned about basic repetition such as the FOREVER-loop and the
REPEAT-loop.

In this chapter, you will expand your knowledge of repetition structures in Scratch. You
will also learn to use variables with repetition structures.

What is a Repetition Structure?


A repetition structure in coding is also called an iterative structure or a loop.
How many times
Loops are used when a program needs to repeatedly process one or more instruction
until some condition is met, at which time the loop ends.

Guided Activity 7.5.1


Let us revise the FOREVER loop.

The FOREVER loop is an infinite loop. It keeps on executing until you stop the program as it has no
condition or counter or value that will stop it.

In this activity, you will generate two random numbers and calculate the sum of the two random numbers.
First, we must create an IPO table.

Input Processing Output


Sprite 1 Sprite 1 Sprite 2
Generate two random numbers Get the sum of the two numbers Display the sum o the two numbers:
Sum Number 1 * Number 2 Sum

Now, let us do the coding:

1. Open Scratch and create the following


Stage

2. Add three INTEGER variables and set the


variables for all Sprites:
• iRandNum1
• iRandNum2
• iSum

When you select “For all sprites” the variables will be


applicable for all Sprites.

181
3. Change the variable display to a large
readout by right click on it and selecting a
large readout.

4. Add the following instructions to the Sprite


– Dee.

5. Add the following instructions to the Sprite


– Abby.

182
6. Run the code and see how the sum of two
random numbers is calculated every 2
seconds. (Your numbers may differ from the
screenshot).

7. Now recreate iRandNum1 and iRandNum2


variables “for this sprite only” and see if
Abby still calculates the correct value.

183
Guided Activity 7.5.2
Let us now look at a loop that executes a fixed number of times Constant value
Loop will execute 10x
(uses a constant value).

The REPEAT-loop can use a constant value and is mainly used for repeating
something a specific number of times.

We use the REPEAT loop with a constant if we know exactly how many times
the loop must be executed.

Let us look at an example:

1. If we want to display the 12-times table, we could use a loop that executes
exactly 12 times. 1 x 12 = 12
2 x 12 = 24
We need to use a variable that starts at 1, and increases by one, each time :
the loop executes to display all the answers from 1 x 12 up to 12 x 12. :
11 x 12 = 121
12 x 12 - 144

Set variable to 1 (must start at 1 for 1 x 12)

The instructions in the loop will be


repeated exactly 12 times to mimic the
12x table

The first time the loop executes it will


calculate 1 x 12

Increase variable by 1 to get the next


number: for 2 x 12, then 3 x 12….12 x 12

• Now load GA7_5_2 and run the code.

• Make sure that you understand how the code works

184
The REPEAT-loop can also be used with a variable instead of a constant value Variable

We use a variable with the REPEAT-loop if we do not know exactly how many
times a loop needs to execute

The number of times the


instructions in the loop will
be executed, depends on
the value of the variable,
iNumber.

We can adapt the previous example to use a variable instead of the fixed value, 12 which will only
allow us to do the 12x table.

2. We can change the program to work for any multiplication table – not only 12 – by letting the program
asks the user which multiplication table he/she wants to practice. The user can then enter the
multiplication table, e.g., 6. The loop will then execute 6 times to illustrate the 6x table.

You could change the above program to work


for any number of multiples (not only for 12)
by using a variable for the number of times
the program must execute.

You could also change the above program to


learn all tables (not only the 12x table) by
using a variable instead of the constant, 12,
within the loop

• Now load GA7_5_2_a and run the code.

• Make sure that you understand how the code works

• Make sure that you understand the difference between the previous solution (GA7_5_2) and this
one (GA7_5_2_a).

185
Activity 7.5.1
1. Use the following stage and sprites

Action 1 Action 2 Action 3 Action 4

Write a Scratch program that will let the ballerina perform all four actions five times.

2. Igor is programming an animation for his friend Frank. He wants to show him jumping on the
trampoline. Help him do the following three activities.

a. Code the following in the correct order and see what happens

The “glide” block moves the Sprite at a


steady pace to the specified position on
the (x; y)-axis.

186
b. Explain each of the following instructions in your own words:
Instruction Explanation

c. The following instructions allows Frank to do a full somersault from the right when the right
arrow key is pressed. When the left arrow key is pressed, he does a full somersault from the
left. Put the instructions together to make Frank do a somersault.

187
3. Study the following flowchart and write the Scratch
program that will implement the instructions in the
flowchart.

4. Change the program in Question 3 to display only the first initial of the name with the surname.

Loops - CS50's Introduction to Programming with Scratch (harvard.edu)

188
Guided Activity 7.5.3
Let us now look at a loop that uses a condition
REPEAT UNTIL <condition> The condition is placed here

The REPEAT UNTIL loop will execute until a specific condition is met (becomes true or becomes false)

You have learned about condition in Unit 7.3.


Refer tot Unit 7.3 to revise conditions.

1. Watch the following video: https://youtu.be/vkl2TwfMGyA and answer the questions that follow.

a. When will the loop stop executing?

b. Explain in your own words what the program does.


2. Let us look at a number guessing game.

• The computer thinks of any number from 1


to 10.

• The player (user) must guess which number


the computer is thinking of.

• The program will stop if the number that the


player guesses is the same as the number
the computer is thinking of (condition)

• If the number the player (user) guesses is


lower than the number the computer is
thinking of, the computer tells the user that
he/she must guess a higher number

• If the number the player (user) guesses is


higher than the number the computer is
thinking of, the computer tells the player
that he/she must guess a lower number

• When the user guesses the correct number,


the computer tells the user how many
guesses it took to guess to the correct
number

189
3. Load the Scratch program GA7_5_3 and run it, then answer the questions below:
a. When will the loop stops executing?

b. Which instructions will be carried out after the loop has stopped?

c. Why are the instructions below repeated twice (before the loop and within the loop)?

d. What is the purpose of the above instruction?

e. What is the purpose of the following instruction?

f. What will happen if the instruction in e. is placed outside the loop?

Activity 7.5.2
1. Watch the video and answer the questions that follow:

https://youtu.be/mkLlb9B_KRM

a. What is a loop?
b. Describe the FOREVER loop

c. Describe the following REPEAT

d. Describe the
e. Under which circumstances will you use a REPEAT

What is a loop?

Describe the FOREVER


loop

Describe the following


REPEAT loop

2. Write a Scratch program that will do the following:

• The program must ask the user how many times the user wants to display the word ‘Hallo’

• The program must then display the word ‘Hallo’ the number of times as requested by the user.

3. Write a Scratch program that uses a loop to display the first 10 natural numbers.

190
4. Change the program in no Question 6 so that the user could indicate how many natural numbers
he/she wants to display.

5. Write a Scratch program that will ask the user

• how many random numbers he/she wants to display?

• what the lower and upper boundaries of these numbers must be (from which value to which
value)?

6. Write a Scratch program to validate mobile phone numbers

• A mobile number is valid if it has 10 digits, e.g. 0621234567.

• The program must accept mobile numbers until the user indicates that there are no more
numbers to validate.

• If the mobile number is valid (has 10 digits), display a message ‘valid’. If the number is invalid,
display the message ‘invalid’

191
UNIT 7.6 REVISION AND CONSOLIDATION
In this unit you will revise what you have learned about coding. You will also work through examples of
games coded in Scratch to provide you with the background to code your own Scratch game.

Coding Structures
We have learned that, when coding, we combine the three basic coding structures. Watch the following
video to revise the coding structures: https://youtu.be/eSYeHlwDCNA

Techniques for Solve Coding Problems

Computational Thinking
Following the four pillars of computational thinking could help us solve problems, for example, if we want to
draw a 3 cm x 3 cm square:

We could use computational thinking to solve the problem:

Abstraction Focusing on the important Ahh! I can see this is square


details and ignoring the things
you do not need.
Get the main ideas
Decomposition Breaking a difficult problem into If we draw one line at a time, the
small manageable parts problem is made easier:
Take the main ideas and break Draw a 3 cm straight line
them into smaller Turn 90 degrees to the right
parts/problems Draw a 3 cm straight line
Turn 90 degrees to the right
Draw a 3 cm straight line
Turn 90 degrees to the right
Draw a 3 cm straight line
Turn 90 degrees to the right
Pattern recognition Recognising patterns within or The following steps are repeated
between problems 4 times:
Are there any patterns? Things Draw a 3 cm straight line
that are repeated? Turn 90 degrees to the right
Algorithm A set of rules or steps that Repeat 4 times
anyone can follow to solve a Draw a 3 cm straight line
problem. Turn 90 degrees to the right

192
Creating an IPO (Input-Processing-Output) Table
Using the tools such and IPO table should become part and parcel of every programming task that you
analyse and need to code.

Representing algorithms as flowcharts


Refer to Chapter 4, Unit 4.3.

Revision and consolidation activities


Activity 6.1
1. See if you can answer all the questions correctly
Scratch Quiz Questions And Answers - ProProfs Quiz

2. Question 2.1 – 2.5 provide the problems that must be solved for each of the Sprites

The program has five sprites:

Code each sprite separately as described by 2.1 – 2.5 – they are not related.
1.1 Write code for sprite One that will calculate and display the square root of 625 when the
Green Flag is clicked.
1.2 Complete the code for Sprite Two:
When the spacebar is clicked the program must determine which of the two numbers
iNum1 and iNum2 is the biggest
The program must then display the biggest number
The following code is provided:

1.3 When sprite Three is clicked, write a Repeat loop that will execute the instruction,

5 times to display 5 stars (*****) as one string


1.4 Write code for sprite Four. When the number 4 is clicked, the code must determine how
many characters the text, Heibo! Brother, consists of and display the number of characters
1.5 When sprite Five is clicked, write code that will change the value of Y with 2 times the value
of X

193
3. Write a Scratch program to validate mobile phone numbers and to change the mobile numbers to
international format:

Remember: It is always helpful to represent the main steps / main ideas of an algorithm using a
flowchart

• A mobile number is valid when the length of the number is 10 digits, e.g., 0621234567.

• The internal format of a South African mobile number is e.g., +27 621234567

• The program must accept mobile numbers until the user indicates that there are no more
numbers to validate and convert to international format

• If the mobile number is valid (has 10 digits), it is converted to international format (the 0 is
dropped and +27 is added)

• If the mobile number is invalid, display a message ‘invalid’, and the number must not be
converted to international format.
4. Write code to solve the following problems:

a. The program that generates a random number between 1 and 50, then displays all the factors
of that number.
b. Write a program to determine the sum of the first 10 natural numbers.

c. Write a program where you can enter your test scores and determine the average mark

5. Challenge
Study the following problem statement, then rearrange the code provided to create a working program
for the problem statement:
Problem statement:

The Scratch program needs to determine who the tallest learner in a class of an unknown number of
learners is. Each learner is represented by a number, e.g., the first learner is 1 and the last learner in the
class is n, where n represents the size of the class.

The following represents a high-level algorithm for the problem (you need to refine the algorithm and
implement the algorithm in Scratch)

• A random number between 100 and 200 (cm) must be generated each time to represent the height
of the n learners.

• For each learner’s height generated, check if the learner is taller than the previous learner.

• If the learner is taller than the previous learner, then

o The variable storing the tallest learner’s height will change.

o A message will be displayed: Learner no? is now the tallest”.

• When the height of all learners was checked, display a message:” Learner no? is the tallest learner
in class”

6. Challenge

Write a program that will display the first 10 terms of the Fibonacci series

194
The Fibonacci series is a series of numbers in which each number ( Fibonacci number ) is the sum of the
two preceding numbers. The simplest is the series 1, 1, 2, 3, 5, 8, 13, 21,…etc.

The program receives the first two numbers (1 and 1) as input and displays these two terms with the
next eight terms in the series (2, 3, 5, 8, 13, 21, 34, 55…)

101 Computing Quiz

195
Examples of Games
Example 1 Breakout Game
A breakout game consists of one paddle used to return a bouncing ball back and forth across the screen.
The aim of the game is to break the bricks of a brick wall by getting the ball to hit/bounce on the bricks.
Step1: Paddle Step 2:

Use paddle sprite


Add ball sprite Resize to 50
Add code to control paddle
Add code for ball sprite

Step 3: Bouncing off paddle Step 4: Make variable for keeping score
Add code to ball sprite to make it bounce when it
hits the paddle. Make variable
Add code for paddle sprite to initialize score to 0
before game starts

Step 5: Add brick sprite Step 6:


Create a variable Number_of_Lives for paddle
Use button 3 for brick sprite and initialize to 3 when the game starts
Add code for brick to disappear when the ball hits it
and increment score by 1 when it happens

Add a line sprite and position it

below the paddle


Add code to the ball sprite to see if it hits the life
Duplicate brick to form 10 bricks
line (if it does the player will loose a life and the
ball will bounce back

Step 7: Add Game Over backdrop

196
Add Game Over backdrop Load the program
Switch to Game Over backdrop Execute it and ensure that you understand the
code

breakout game in scratch | 101 computing

Example 2 Cat-and-Mouse Game


The cat is chasing the mouse and tries to capture it. It involves constant pursuit, near captures, and
repeated escapes. The "cat" is unable to secure a definitive victory over the "mouse", who, despite not
being able to defeat the cat, is able to avoid capture.

Step 1: Cat Step 2:


Use Cat sprite and add code for Cat sprite to Add a time to the Cat sprite
continue moving until the mouse pointer is
reached

Step 3: Add another sprite Step 4: Add the mouse sprite


Make an empty sprite with two costumes: one Add the mouse sprite and code for the mouse
blank (costume 1) and one with a "Win" banner sprite
(costume 2).
Add code for this sprite
to make a variable timer:

For the main cat sprite, change the "touching" and


"point" to "Mouse" instead of "Mouse-Pointer"
cat and mouse - scratch wiki (scratch-wiki.info)

197
Example 3 Space Invaders Game
Space invaders is s shoot ‘em up game where the player controls a cannon at the bottom of the screen,
which can move only horizontally. The aliens moves both horizontally and vertically (approaching the
cannon).

Step 1: Create project Step 2: Start coding


Change backdrop to Stars Ensure Stars backdrop is
Delete Cat sprite and add Rocketship always displayed when game
sprite starts
Resize Rocketship sprite to 35%
Delete costume no 5 of Rocketship Animate the Rocketship sprite
sprite
Controlling the Rocketship
Ensure the rocket ship is positioned at the bottom of sprite using the left and right
the screen. arrow keys
The user should be able to slide the rocket ship
horizontally to the left or the right using the
arrow keys
Step 3: Add and code Invader sprite Step: 4: Add Game Over Screen
Add Invader sprite and resize to 40 Add Game Over screen

Add code for the Invader


sprite and animate the
sprite
Add code to the invader sprite to
detect when the invader is touching the rocket
ship.

Add code to let the


invader move across
the screen
Everytime the sprite
reach the edge, it
should drop down
closer to the rocket
ship and change
direction (left/right
movement).

Step 5: Add laser beam sprite Step 6: Adding score variable


Paint laser beam sprite and add
Make score variable:

198
Edit Rocketship sprite:

Add code to Invader sprite:

Add code for laser beam to let the user fire a laser
beam by pressing the space bar. The laser beam will
always be launched from the rocket ship current
position:

Step 7: Add more Invaders Step 8: Run the code


Duplicate Invader sprite Load the program
Execute it and ensure that you understand the
code

space invaders in scratch | 101 computing

Example 4 Boardgame using a dice


Watch the following videos to create a snakes & ladders
boardgame:

Creating dice https://youtu.be/qt3wjftisry

Creating the board https://youtu.be/-aqt9jnyaok

Playing the game https://youtu.be/1l3c0y4l6ou

199
More games ideas
Watch the following videos for more ideas
Maze Game https://youtu.be/zEH1JOIbD5o

Racing Game https://youtu.be/aYnKI0fEXA4

Challenge – CREATE YOUR OWN GAME!


Use the programming knowledge and skills that you have gained in Grade 8 and Grade 9 as well as the
ideas from the example games to develop your own game in Scratch.

Your game must make use of all three coding constructs (sequence, selection and repetition) as well as at
least one variable.

https://www.create-learn.us/blog/scratch-pong-game-tutorial-for-kids/

200

You might also like