0 ratings 0% found this document useful (0 votes) 150 views 109 pages Grade - 02 Computing Part 3
Grade -02 Computing part 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save Grade -02 Computing part 3 For Later je an animator
Steps to complete tasks
Learn
To write an algorithm, we need to break down the task into steps.
Look at the example below. It shows the the steps to make a cup
of tea.
Algorithm for making a cup of tea =
The steps to make a cup of tea are:
) Leave for 5 minutes '
- ~- ~ e Pour w warm water | }
: Remove the teabag } _—into teacup
i f “Place a teabog 5
{ _ Add milk } bay in a teacup 3
£ Boi water i ina kettle |
Now that we atin the steps, we can put them in order.
The e steps are in order in this algorithm.
“Step “Instruction
> Boil water in a kettle
© Place a teabag in a teacup | A
©) Pour warm water into teacup ; 1
+ ‘ When we write an
© Leave for 5 minutes algorithm, we must
put the steps in
© Remove the teabag the correct order.
e
Add milkace att
‘You have been asked to make yellow slime.
a There are five steps to make yellow slime. One instruction
is not needed. Which one? _
b Put the instructions in the correct order.
4 6 ye
Measure out the
ingredients.
Mix the
ingredients.
Make more
slime.
Get the
ingredients.
Add yellow colouring.Unit 4: Be an animator
Using repeat
Learn
Sometimes, we want to repeat some instructions. In ScratchJr, the
Repeat block is used to repeat instructions.
ae ee
A repeat command makes writing
| algorithms and programs easier! ay,
This algorithm and ScratchJr program are for a Cat.
“Step Instruction ae
Start on Green Flag
o
® Jump (2)
8
o
Jump (2)
Jump (2)
© Stop program
The Cat jumps repeatedly.
We can change the program to use a Repeat block. There were
three instructions to Jump (2). So, we enter 3 into the Repeat block.
|Step Instruction |
©) Start on Green Flag _
® Jump (2)
© Repeat step 2 two more times Keyword
repeat: do
© Stop program something again
SSOpen a new project.
Add any Background.
Add the Cat character.
Add the code with the Repeat block
from page 60.
Run your code. Do you get the correct results?
Add the Dog character.
7 Create a program for the Dog that uses the Repeat block to
match the algorithm below.
PWN =
au
Step Instruction
eo Start on Tap
Say “Woof!”
Move Right (2)
Move Right (2)
Move Right (2)
Say “Woof!”
eeoeoo 080
Stop program
8 Run your completed
program.
Explain to your partner what the
Repeat block does in your program. 3je an animator
“Liam is getting dressed for school. What is the error in
the algorith
; Step
( “Step ® Put on trousers i
_ Step © Putonshoes
( Step @ Put on socks
Computational thinking
What are some additional steps to get dressed if it is
winter time? Write a new algorithm to get dressed
during winter. )
eooocooso
Which program does the same thing as this algorithm?
2 Here is an algorithm for a Seahorse character.
Step Instruction ®
Move up 4
Move up 4
Shrink by 2
Shrink by 2
Shrink by 2
Stop program}e an animator
y eae Seles
Start a new project. Add the correct
code from the Go further activity to the
Seahorse character.
Add a Fish character.
Create a program for the Fish to match
this algorithm.
Instruction
Test your code
to see if you
get the correct
results.
| Start on Green Flag
Say “Hi Seahorse”
Move right (6)
Move left (2)
Play pop sound
t =
Repeat steps 3 to 5 two more times.
ries i
e | Stop program |
Add the Starfish character to your project.
Add the code below to the Starfish and run it.
he «
Change the code for the Starfish so it uses the Repeat block.
The new code should get the same results.
Run your final program.Unit
Wroces
1 Look at the algorithm to get out of a maze. It has one error.
What is the error? How would you correct it?
Be an animator
Move up (3)
Move right (4)
[Move up (15
Think about the things you do every night when you go to bed.
Write an algorithm for going to bed. Include all the things you
do in the correct order.
a Create a program from the algorithm below for the
Include the start
@ Start on Green Flag and end steps in
@ Jump Caen your algorithm.
rll Senate Sila |
© Move right (2
Jump (1)
Move right (2)
Jump (1)
Move right (2)
Stop programUnit 4: Be an animator
Did you know?
Google uses algorithms for its search engine. Its newest search
algorithm is named Hummingbird.
(Good job! Now you can ;
Read and review what you can do. create algorithms and
Y Ican find and correct errors in programs that repeat
algorithms. instructions.
V Ican identify the steps to AS
perform tasks. .
V Icancreate programs that use the
repeat command.Unit 5 Arai eters Maa ion cy
Network devices
Get starte
Look at the two pictures of remote control toy cars.
Discuss with your partner what the differences are between the
two cars.
e Tell your partner which type of car you like best.
e Tell your partner why you like the chosen car.
e How does the controller send messages to the car?
You will learn:
e that different devices can connect to a network
e that two devices can work together
e to explain the terms wired and wireless networks.
In this unit, you will learn about
wired and wireless networks.evices and networks:
Discuss these questions with your partner.
1 What is a network?
2 What devices do you know that cannot connect to a network?
3 What is the internet?
Before starting this unit, check that you:
know that devices can connect to make a network
know that the internet is made of many computers
connected together
know that some devices are connected by wires and other
devices are not
know there are times when the internet is not available.Devices and networks
Networks Keyword
Network devices edit: to make
changes or
corrections
You already know that desktops, laptops, tablets and smartphones
can connect to a network and the internet.
Many other devices can also connect to a network and the internet.
Below are some of these devices.
An e-reader is used to read ebooks.
E-readers can connect to the internet
without wires.
Ascanner takes images from
printed photographs. It allows
a.user to edit the images on
a computer.
Scanners can connect to a
network with or without wires.
A photocopier makes copies of documents.
These copies can be sent to a computer.
A photocopier can connect to a network with
or without wires.Unit 5: Devices and networks
Asmart TV lets users view movies and shows.
It also runs apps.
Smart TVs can connect to a network with or
without wires. This allows users to stream
movies and play games over the internet.
Asmart music system connects
speakers in different rooms.
It can be controlled using another
device like a smartphone or tablet.
It connects to a network
without wires.
A smart bulb is a special light bulb
that is connected to the internet.
It can be controlled using an app.
Asmart bulb connects to a network
without wires.
Smart bulbs can change colour and
turn themselves on automatically.
A home security camera records
a video of a house. The video can
be seen on a smartphone tablet
or computer.
These cameras can connect to a
network with or without wires.Unit 5: Devices and networks
Practise
2 Choose the correct answer to complete each sentence.
a Ahome security camera can connect to a network :
with wires without wires with or without wires
b Ascanner can connect to a network s
with wires without wires with or without wires
A photocopier can connect to a network z
with wires | without wires with or without wires
An e-reader can connect to a network :
with wires without wires with or without wires
Asmart TV can connect to a network p
with wires without wires with or without wires
Which of the following devices cannot connect to a network
with or without wires?Networks
Devices working together
er
A device that is not connected to another device is known as a
standalone device.
Astandalone device cannot talk to other devices.
( Connected devices |
Standalone device —
cae aaa
Two devices connected
together can do more than
a standalone device.Unit 5: Devices and networks
Two connected devices let users send emails or messages.
Connected devices can share devices such as printers. This means
that a home can have one printer to share among everyone in
the house.
Connected devices can easily share files such as documents,
videos and images.
A standalone device cannot easily share files.
“Smart’ household devices can connect to a network.
They can do more things than normal household appliances.
Asmart bulb can turn itself on automatically.
Asmart TV can connect to the internet.1 Say if these statements are true or false.
Statement True or false?
Two connected devices can do more than
one device.
Two connected devices can talk to
each other.
Users on two connected devices cannot
share printers.
Files can be shared if two devices are
connected together.
Astandalone device can talk to other devices.
Tick (W) the standalone device.
mmo
Ss
Say if you will need a standalone or a connected device to make
the following tasks easier.
Task Standalone or connected
device?
a_Type a letter on a desktop
b_ Send the letter to your friend
c_ Print the letter
Dye IR YoltN cireyniea
The first large computer network was called ARPANET. It was
developed in 1969.Jevices and networks
Internet
Wired and wireless networks
et)
There are two types of networks: wireless and wired.
Wireless networks
Anetwork connected without wires is called a wireless network.
Devices connected to wireless networks can move around
and stay connected.
Wireless networks are popular in homes and cafes.
Laptops, tablets and smartphones often connect to
wireless networks.Unit 5: Devices and networks.
Wired networks
Awired network uses cables to connect devices.
Devices connected to wired networks do not move around.
Wired networks are often used in businesses or schools.
A good example of a device that connects to a wired network is a
desktop computer.1 Complete the sentences. Choose the correct word in brackets. ©
by ticking (W) the column.
Sentence Wired Wireless
a (Wired/Wireless) networks are popular
in homes.
a
(Wired/Wireless) networks are popular |
in offices.
a
(Wired/Wireless) networks are normally
used for devices that can move around.
a
(Wired/Wireless) networks are normally
used for devices that do not
move around.
e Smartphones normally connect to
(wired/wireless) networks.
=
Desktops normally connect to (wired/
wireless) networks.
Wireless“Draw a wired network with three devices. Write the names
of the devices.
© Draw a wireless network with three devices. Write the names of
the devices.
~ Complete the table. Cut out each statement and paste it below
the correct heading in the table.
Wired network
Wireless network
(devices connected without wires ) “often used in schools |
often used in homes devices connected with wires
users can move around easily with their device
devices do not normally move
«Unit 5: Devices and networks
ys Challenge yourself!
Give one example of a place where wireless networks may
be used.
Give one reason why it may be used there.
Name some devices that can be part of the network.
Give one example of a place where a wired network is used.
Give one reason why it may be used there.
Name some devices that can be part of the network.
Tell your partner about the differences between a wired and
wireless network.
Say if these statements are true or false.
Statement True or false?
a Astandalone device can share information
on a network.
Connected devices can communicate
via email.
Connected devices cannot share devices
like printers.
“Smart’ household appliances can connect
to a network.
Two devices working together can do things
one device cannot do on its own.Unit 5: Devices and networks
My project
The school principal is thinking about building a computer network.
The principal has some questions.
Can you help the principal to answer these questions?
1 What are the benefits of connecting two devices together?
2 Which of these devices can connect to a wired network?
Name three devices that commonly connect to a
wireless network.
List three devices that can connect to both wired AND
wireless networks.
Draw a sketch of each type of network.
What can you do?
Read and review what you can do. Good work! Now you
¥ Iknow about devices that can know more about wired
connect to a network. and wireless networks.
v Iknow that two devices can
work together.
v I know how to explain the terms wired and
wireless networks.Uitia-y Be a designer
Dance routine
Get started!
Work in groups of four. Discuss what types of dances you like.
Take turns to show your group your favourite dance moves.
What are the steps in your dance?
You will learn: In this unit, you will
to follow and understand create algorithms
algorithms and programs
to plan instructions for characters in Scratchdr.
in programs
about working with others when
debugging programs.Be a designer
Work in pairs. Look at the moves in / There is a pattern
the dance routine below. in the moves. {
Discuss with your partner what you think is the next move.
IDLO ole cunt slanl =e
Before starting this unit, check that you:
e understand that algorithms are a set of instructions
e know algorithms can be created as programs
e know that ‘debugging’ means correcting errors.
In this unit, you will use ScratchJr. There is
an online chapter all about ScratchJr. p)Writing algorithms and
Understanding algorithms
programs
An algorithm is a set of instructions to complete a task.
These instructions need to be in the correct order.
A dancer moves from point 1 to point 2 as shown below.
one algorithm is correct.
Algorithm A and B are instructions for the dancer. However, only
Algorithm A
Move 2 blocks down
Move 2 blocks down
Move 3 blocks right
Move 1 block right
at
nWN
Algorithm B
“Move 2 blocks down
2 Move 3 blocks right
© Move 2 blocks down
«Move 1 block right
does not reach point 2.
Algorithm A is not correct. Steps 2 and 3 are
in the wrong order. This means the dancer
Read both algorithms. Can you see that Algorithm B is correct?Be a designer
Look at the path a singer walks while on stage.
She walks from point 1 to point 2.
‘1 Put the steps in the correct order that the singer takes.
(A Move 3 blocks down) (B Move 1 block down)
Cc Move 2 blocks down ) C D Move 1 block to the left 3)
E Move 3 blocks to the right
Algorithm
What is the shortest path from point 1 to point 2?
Discuss with your
partner what the
steps are.
Hint: The shortest path has
a total of 2 steps and has
two possible solutions.Planning instructions for characters
Learn
Planning a dance routine
We can plan the instructions for a character’s dance routine by
writing an algorithm.
The steps are written in the order we want in the dance routine.
Step Instruction
Start on Green Flag |
Turn left (3)
Turn right (3)
Jump (2)
Move right (1)
Move left (1)
Stop program
esoosgc oes
We can change this algorithm into a program.
We write code in ScratchJr for each step.
We use the Hop block to jump.
This code is added to a Person character in ScratchIr.
When we run the code, we get the results we wanted. This means
the program followed the dance routine algorithm correctly.
“In ScratchJr, the number 3 is a |
quarter turn when using the Turn —
Left or Turn Right block. raee
Create the program on page 84 by following these steps:
1 Open anew project and add any Background.
2 Add the blocks of code to any Person character.
3 Run your program and see what results you get.
We want to add a Child character. The Child should dance when
the Person bumps into it.
4 Complete the algorithm for the Child character. When bumped
into, the Child should start dancing. The dance should consist of
the following:
e Move up 4 grid squares
e Jump 2 grid squares
e Move left 1 grid square
e Turn right for a full turn (12)
Create the code for this algorithm in ScratchJr.
6 To test it, place both characters close enough so that the Person
bumps into the Child.
Step Instruction |
Start on Bump
uw
Move
2
Move
Tum sea:
Stop program
eee0080Be a designer
Debugging programs with others
A bug is a mistake in an algorithm Keyword
or program. Finding and removing debug: to find and remove
the mistake is called debugging. errors in a program
It is good to work with others
when debugging programs.
F , : than one when
Debugging with others: | aeiwtet esis
» is faster ee
» makes it easier to find all the bugs
~ lets us share knowledge and learn from others.
Look at the algorithm and the first program below. }
The code has one mistake. _
Two heads are better
Step | Instruction
©) Start on Green Flag
© Move Right (4)
© Turn Left (3)
© Move Up (2)
6 | End program
First, we need to find the mistake. Then, we can correct it.
We need to change the Turn Right block to the Turn Left block to
correct the program.Debugging a program in groups
1 Open a new project.
2. Add a Background of your choice.
3 Add the Astronaut. The Astronaut should follow
these instructions:
“Step “Instruction 3 HD
@ Start on Green Flag
Move left (5)
Turn right (3)
py)
Turn left (3)
Move right (5)
Stop program
4 Add and run the code above.
5 Ingroups of three, debug the code.
Were you able to debug the code
faster in groups than by yourself?
ecocooLook at the path a mouse takes to the cheese. How many
blocks must the mouse move to get to the cheese?
Qe
Computational thinking
2 Complete the algorithm in the table below wit
steps to get the mouse to the cheese.
_Step Instruction
_o | Move right
_@ Move
|e __Move
The code for the algorithm is on
the right. It contains errors.
Work in groups of three to find 7 2 5 Pe
the errors.
Discuss in your group how
you would fix these errors.y eee Soe
‘1 Open a new project and add a background.
2 Recreate the algorithm in Go further. Add it to the Dog.
3 Table 1 shows new instructions we want to give to the Dog.
Change your program to match Table 1.
Table 1
@ Start on Green Flag
@ = Move right (4)
© Jump (2)
@ Stop program
4 Add the Butterfly.
5 Table 2 shows the instructions for the Butterfly. Create a
program to match Table 2.
Table 2 |
@ = Start on Tap
@ Move down (2)
© Grow (2)
© | Repeat step 3 four
more times
@ Stop program
6 Run your program. Check that you get the desired results.
Work in pairs to debug your programs.Wises
Design a dance routine with your partner.
1 Open anew project in ScratchJr and add any Background.
2 Adda Child character and the code below.
3 Draw a line to match each code block to an instruction.
Code Instruction
Move left (5)
Stop Program
Say “Dance!”
Start on Green Flag
Move right (5)
Play pop sound
Add a Person character
to your project.Unit 6: Be a designer
Look at the algorithm and code for the Person. The program has
errors. Find the errors with your partner.
if Start on Bump
@ |Turnleft(1)
© Tumright(1)
| @ End program |
6 Fix the errors and add the correct code to the Person.
Test your program. Check that you get the correct results.
Did you know?
The Mars Climate Orbiter was
a spaceship.
A bug in the program controlling
the spaceship caused an error.
The mission could not
be completed!
a)
! 7 Great! Now you can
Read and review what you can do. plan algorithms and
Y Ican follow and understand work with others to
| algorithms. (debug programs. |
| Y Ican plan instructions for characters ~~ —Ss SX |
in programs. ~ |
| Lknow about the benefits of working
| with others when debugging programs.Solving problems
Get started!
Sharlene and her friends are at the candy shop.
Sharlene has $5.00, Joe has $2.00 and Sandy has $2.00.
In pairs, use the data in the table to answer the following questions.
Candy Quantity {Cost
Chocolate | 1 bar $5.00
Gummies | 1 bag $1.00
Candy corn |1 bag $1.50
1 Who can afford to buy chocolate?
2 How many bags of gummies can Joe buy?
3 Which candies can Sandy buy?
Talk about.how you got your answer.
You will learn:
¢ about the types of data that a question may generate
e about data that can be recorded using computing devices
e how data may help to solve problems.
In this unit, you will learn _
about different kinds of data
and how they can be used. bDraw a line to match each question with the number of
answers to be given.
Question Number of answers
Ten children are asked their
favourite colours.
1 answer
Susan is asked, “When is your
birthday?” 10 answers
Anna is asked, “What is your
form teacher's name?”
Twenty people are asked,
“What is your favourite 1 answer
movie?”
20 answers
Before starting this unit, check that you:
¢ know about questions that can be answered using a data table
¢ know how to use computing devices to present data
¢ know that computing devices collect data for a particular purpose.a data scientist
Data
Statistical vs non-statistical
ee
There are different types of questions.
A statistical question has more than one answer.
Anon-statistical question has only one possible answer.
Let us look at some examples of statistical and non-statistical
questions.
‘What are the favourite snacks of
the students in Mrs Ali’s class?
This is a statistical question. There is more than one
possible answer.
How tall are the boys on the basketball team? —~
This is a statistical question. There is more than one
possible answer.
What colour are these words written in? \__
This is a non-statistical question. There is only one
possible answer to this question.
How long is your school day?
This is a non-statistical question. There is only one possible answer
to this question.‘| Say if the following sentences are
true or false.
Sentence True or false?
a Anon-statistical
question has more
than one answer.
b There are different
types of questions.
c Astatistical question
has only one
possible answer.
2 Work with a partner. Draw lines to
show if each question is statistical
or non-statistical. The first one is
done for you.
a How tall are the students in
aclass?
b What colour is David’s shirt?
c How many dolls do five
children own?
d_ What is Janice’s shoe size?
e What are the test scores of
15 students?
f What is Sheldon’s favourite
subject?
StatisticalUnit 7: Be a data scientist
Computing devices
Statistical data
You collect statistical data when you ask a statistical question.
Statistical data can be grouped into two categories:
numerical or categorical.
Numerical data
Numerical data can be counted or measured.
Here are two examples of numerical data:
The picture shows a teacher collecting
the test results from six students.
a i eS aaa STE
pais reading on the
ea is 98.6 thermometer is 98.6 degrees.
Sd
Categorical data
Categorical data can be grouped into categories.
Here are two examples of categorical data:
» eye colour (brown, blue, black, green, amber)
» hair colour (black, brown, blonde).Unit 7: Be a data scientist
Categorical data can be given numerical values. For example, you
could use:
~ the number 1 for black hair
» the number 2 for brown hair
» the number 3 for blonde hair.
However, these numbers do not have any meaning. For example,
you could not add them together.
Peeae ba eer
Never try to add,
»—.. subtract or multiply
categorical data!
1. Do you own any pets?
i F ves O No
Computing devices can be used to record |, /.,, Bae oa Vou A,
data on electronic forms. aur
These forms can contain categorical geese sole fo aw another
a pet?
and numerical data. Teas |i9340
Numerical data is entered by typing or eerie
selecting a number.
Categorical data is entered by selecting a category.Unit 7: Be a data scientist
‘1 Copy the sentences.
Fill in the blanks with
the correct words:
categorical, statistical,
a gs
Hint: A word can a)
be used more than
once or not at all.
numerical.
a Two main types of statistical data are and
data.
b data is data that can be counted or
obtained by measurements.
c data are grouped based on characteristics.
2 State if the following data to be collected is numerical or
categorical data. Tick (W) the correct column.
Data Numerical Categorical
a Ateacher collects data on her
students’ favourite food.
'b. Jodie measures the height
of a plant each day.
Her measurements are:
5cm, 7cm, 6cm.
c Students belong to one of four
houses: yellow, blue, red
and green.
|
3 Draw aline to match the data to the labels.
a Rainfall in 3 days: 2mm, 1mm, 3mm Categorical data
Feelings of students: happy, sad EDN
b
c Number of students in classes: 25, 30,15 |
E us Numerical data
cd Favourite snack: chips, chocolate, popcornData
Solving problems
Data is used to help solve problems. We can use data to decide
what to do.
Data is used to solve problems in the following ways:
» Teachers record their students’ scores. They use this data to see
where each student needs help.
Supermarkets collect data about how many items they sell each
day. They use this data to find out how many items are left.Item Original number Number of Number of
name of items items sold items left
Rice 35 20 15
“Red beans 20 18 2
Soda 22 12 10
The table shows there are only
2 cans of red beans left.
» Weather forecasts use data about rain and wind. Powerful
computers use this data to predict tomorrow’s weather.
» Map systems in cars collect data about traffic.
They use this to calculate the quickest route between one place
and another.Unit
ea data scientist
1 Say if these sentences are true or false.
Sentence True or false?
a Data is used to
solve problems.
Data cannot be used
to make decisions.
Data can be used
to predict the future.
2. Choose the correct options to solve the following problems.
«Mr Clifford wants to know who got the highest mark in class.
He needs to ...
Option 1 Option 2
Sort the marks in order Add all the students’ marks
Mrs Fields wants to know which brand of ice cream is
cheaper. She needs to ...
Option 1 Option 2
Compare the size of the Compare the price of the
two brands two brands
A teacher needs to know the total number of students going
to the museum. He needs to ...
Option 1 Option 2
Sort the list of students Add the number of studentsUnit 7: Be a data scientist
1 Say if the following data is numerical or categorical. €
Tick (W) the correct column.
Data Numerical Categorical
a Jimmy and Caleb
have red, green
and blue cars.
5 Jimmy has 10
cars and Caleb
has 7 cars.
2 Say if these questions are statistical or non-statistical.
Question Statistical Non-statistical
c What are the video game
scores of five friends?
at school club is Sarah in?
rere does your teacher live? |
© What do students in your class
__ have for lunch?
© How many children are wearing
_ blue and red sweaters today?
w
Draw lines to match the problem with the data that is needed to
solve the problem.
Problem Data
Number of a supermarket Amount of rainfall
| Predicting floods Students’ scores
Helping students, to learn Daily sales of items
102Unit 7: Be a data scientist
allenge yourself!
‘1 Mrs Chen sends a questionnaire to 25 students.
The questionnaire @) “How many siblings do you have? t
has FOUR questions.
Your answer
@ | Whatis your height?
Your answer
® How do you get to school? |
© bus |
O private car |
O tide |
© Other
@ _ doyoulike school?
No 1 2 3 love school
OR OUE IC) |
a Which two questions collect numerical data?
b What device can record the numerical data on the form?
¢ Which two questions collect categorical data?
d What device can record categorical data on the form?
2 Which questions could Mrs Chen answer after sending the form?
A How tall are the students?
B How many students like running?
C How do students get to school?
3 Mrs Chen needs to know how many students travel by bus.
a What question on the form will give her the data?
b What does she need to do with this data?Unit 7: Be a data scientist
1 Work in groups. Collect the following data from the members
of your group. Include the answers in a table like the one below.
Name Height
Eye colour
2 State whether each of the following data is numerical
or categorical.
a Height
b Eye colour
3 Say whether these questions are statistical or non-statistical.
Tick (W) the correct column.
Question Statistical
Non-statistical
What is your eye colour?
How many students in
your class?
What are the eye colours in
your group?
How tall are the students in
your group?Unit 7: Be a data scientist
4 a The teacher wants to know how many students have brown
eyes. What data is needed? Tick (W) the correct box(es).
e Eye colour of students @)
e Name of students we
e Height of students O
b Whois the tallest student in your group?
Did you know?
Data scientists use data to
solve a wide range of very
complex problems!
What can you do?
Congratulations! Now
Read and review what you can do. you know about solving
Y Ican talk about types of data that | data problems.
a question may generate.
¥ Iknow about types of data that can
be recorded using computing devices.
v Iknow how data may help to solve problems.(erat elax ol]
In groups of three, take turns to:
e Sing the alphabet song.
e Write your first name on a sheet of paper.
You will learn: In this unit,
e to write instructions to you will give
complete tasks directions toa
¢ to program a physical physical device.
device.(09
Work in pairs.
The animals shown below are missing the first letter of their name.
Give your partner instructions to draw the missing letters.
For example, for the Crab the instruction to write ‘C’ could be:
Draw a line from right to left.
Leave the pencil on the paper and draw another line up.
Leave the pencil on the paper and draw another line from left
to right.
Take turns with your partner.
= _—_____
Before starting this unit, check that you:
e can give instructions for a task
can give directions (forward, backward, left, right)
© canrun a program
e know that programs can have errors.
107Drawing letters
Algorithm to draw the letter L
Look at the steps to draw the letter ‘L’.
Step “Step @
Start program Set marker down
Step © Step
Turn left Move forward 8cm
a
——=—____—
aan —
\
Step > Step
Turn right Move forward 16cm)
Create the algorithm to draw the letter
eS
Put the steps in the correct order. Step 1 is done for you.
Step __: Move forward 8cm
[aa
8cm |
Step 1: Start program
Step __: Turn left
| —4
Step __: Move backward
16cm
16cm——>
[a
Step __: Set marker down
I,
Step __: Move forward 16cmUnit 8: Be an artist
AMAA
Giving directions
Physical devices
Learn
Some physical devices can
move. We can write instructions
to tell them where to go.
Once we have written our
instructions, we can program
the device.
Here is an example.
We want our physical device to
follow this path through a grid.
To follow this path, we need to
give the following instructions:
Algorithm 1
Step Instruction
Move forward 1 ea
Move forward 1 aes |
Move forward 1 device to follow
Move forward 1 this path?
Turn right \
Move forward 1
Move forward 1 amp
Turn left i
Move forward 1
©oeocogeooe
SoUnit 8: Be an artist
Some steps in Algorithm 1 are repeated.
We can rewrite the instructions like this:
Algorithm 2
“Step Instruction
—() Move forward 1
i Repeat Step 1 three more times
Turn right
Move forward 1
Move forward 1
Turn left a.
Move forward 1 }
S6o000
Algorithm 1 and Algorithm 2 do exactly the same thing.
There are 9 steps in Algorithm 1. There are only 7 steps in
Algorithm 2.
Can your physical device
repeat instructions? If it
can, then program it to
follow Algorithm 2.
aun)1 Here is the algorithm for this path.
Complete the blanks in the algorithm.
Algorithm 3
‘Step Instruction
Move forward 1
Turn =
Move forward 1
Move 1
Move forward 1
Turn
Movelmumiennie |
Move forward 1
BOOC8GGCO0O000Unit 8: Be an artist
2 Work in small groups. Program your physical device to follow
this path.
3 a Rewrite Algorithm 3 using repeat instructions.
b How many steps does this new algorithm have?
4 If your physical device can repeat instructions, then program it
to follow the algorithm in question 3 a.
Computational thinking
1 See the steps below to draw the letter ‘C’ ob.
Circle the correct answer in each step. Steps 1
and 2 are completed for you.
Step 1:GtarD/ Stop program | {Step 2: Set marker up /Gowm>
l,
Step 3: Turn left / right Step 4: Move forward /
backward by 8cm
—
8cmStep 5: Turn left / right Step 6: Move forward /
backward by 16cm
Step 7: Turn left / right Step 8: Move forward /
backward by 8cm
8cm >
——_
Below is a path through a grid. We want our physical device to
follow it.
ary© Here is the algorithm for this path. Complete the blanks in
the algorithm.
Step Instruction
@ > Move
® Tum
© Move forward 1
@ Move
© Tum
Oj) ecvemman'n
7
© Move forward 1
Qo ja
© Move forward 1
| © Move
© Work in small groups. Program your physical device to follow
this path.
© Rewrite the algorithm using repeat instructions. |
© How many steps does this new algorithm have?
115Unit 8: Be an artist
y STS yourself!
Computational thinking
1 Create the algorithm to draw the letter “L’. Put the
steps in the correct order. Steps 1, 2 and 3 are
done for you. Z
Step _: scm — Step 3: Turn right
Move a
forward 8cm ig
Step asi Step __: Move backward 8m)
Move
forward t
16cm 16cm
Step__: — P16
Move
backward
16
cm lb
Step 1: Start program Stepma §
Gl Turn left
marker down
16cm —>
Step __: Move forward 16cm} _{ Step 2: Set
ealSelow is a path through a grid.
The path looks like the letter ‘C’.
2 Write an algorithm to follow this path.
3 Program your physical device to follow this path, if you have one.
4 a Write anew algorithm for a path that looks like the
number ‘0’ ([_)).
b If your device can draw, program it to draw the number sO
zsUnit 8: Be an artist
DYE Roa
Computational thinking
the letter ‘P’. Circle the correct answer in
1. The algorithm below shows the steps to draw ¢ A
each step.
Step 1: Start / Stop program
Step 2: Set marker up / down
I,
(Step 3: Move forward /
backward by 16cm
Step 4: Turn left / right
(—_Step 5: Move forward by
8cm/16cm
8cm
Step 6: Turn left / right
|.
Step 7: Move forward /
backward by 8cm
Joo
Step 8: Turn left / right
Step 9:
Move forward by 8cm / 16cmBelow is a path through a grid.
2 The algorithm below is for this path. There is one error in the
algorithm. Find the error and rewrite the algorithm.
ove forward 1
[Move forward 1
‘Turn right ec
“Move forward 1
Move forward 1
Turn left
Move forward 1
Move forward 1
(Turn left
Move forward 1
Move forward 1
“Turn left ai
| Move forward 1
Oo "Move forward 1
© "Move forward 1
@ Move forward 1
Oo | Move forward 13 Program your physical device to follow this path.
4 a Rewrite the algorithm using repeat instructions.
b How many steps does this new algorithm have?
5 If your physical device can repeat instructions, then program it to
follow the Algorithm in question 4 a.
Notice that the shape of the path is the same as the letter ‘P’.
SN Cale Es
You can code some physical devices to draw, play music, respond
to touch, and more.
Read and review what you can do.
¥ Icanwrite instructions to
complete tasks.
Vv Icangive directions toa
physical device.
Great job! Now
you know how
to give direction
instructions.
apa)Wiley Connected and sharing
Networks
Get started!
Write your birthday on a sheet of paper.
Hand the paper to the person next to you.
Ask them to pass it to the person next to them.
The paper should not be folded.
e Is this a safe way to share information?
e How could you have kept your birthday secret?
e Could the person next to you see your birthday?
You will learn: In this unit, you will
* to know when a network is _ | learn about sharing
and is not available information across
about the risks of sharing networks.
information.
122Unit 9: Connected and sharing
Talk about these questions with your partner.
What is a network?
What is the internet?
How are networks connected?
What devices can connect to a network?
Tell your partner what devices can do when they are connected
to networks.
Before starting this unit, check that you know that:
some devices can connect to a network
the internet is made of many computers connected together
there are networks with and without wires
there are times when the internet is not available.nected and sharing
Networks
Network availability
ReColta)
A device can connect to a network without wires.
The device shows this icon.
-~
°
This tells you the device is connected without wires.
A device can connect to a network with a wire.
Some of the icons that show this include:
ia
This tells you the device is connected with a wire.
The internet is made Keyword
of lots of networks icon: a picture that means
connected together. something on a computer
PaUnit 9: Connected and sharing
Devices show different icons when they are not connected
to networks.
Smartphones and tablets show icons like this.
This means they are not connected.
Desktops and laptops show icons like this.
S
You cannot use the internet if you are not connected to
a network. Devices may show messages to say you cannot
use the internet.
©
Y
The globe means the internet
across the world. The circle with
a line through shows the internet
_is not available.
Not connected
You aren't connected to any networks.
A Troubleshoot
Hmm. We're having trouble finding that site.
We eantcomeet toe seers amngcegecon, Connect to the internet
trot adreicre here tether tng yee an: Youre offine. check your connection.
Packeeet oe
+ you cooecte ut behind Srl cat eon he pmiason to ees he Wa RETRYTf you cannot use the internet, then you cannot:
» send emails
» look at websites
~ watch online videos.
‘1a Which icon shows a device connected to a network by a wire?
b Which icon shows a device connected to a network without
awire?
eZ ©
Cod :
@ S
2. Select the icons that show there is no connection to a network.
@® =~
=
Es @
@tSharing information across networks
The risks of sharing information
Devices on a network can share information with each other. This
means data on one computer can be seen by another computer.
Connecting on a network has many benefits. However, there
are also some risks. One of the largest risks is sharing personal
information.
Personal information includes:
» address
» phone number
» family members’ names
birth date
» school names.
A device on a network sends
information. Other people
on the network may see it.
This means that by sharing
information on a network, other users may get your
personal information.
Sharing personal information is one of the biggest risks of
a network.
You send information when you:
~ send emails
» enter details on websites Keyword
© send instant messages personal information:
a. : information about someone
» add things on social media.
PasConnected and sharing
Malware
Devices connected to a network also receive information. You
receive information when you go to a website or download a file.
Programs that are bad for your computer are called malware.
Some people try to trick you. They send malware across a network.
Signs that your device has malware:
» Your computer slows down.
» You get strange emails.
» You get strange adverts.
» Your device stops working.
» You cannot open your files.
Unit
Signs of
| malwar'
- are
strange strange emails
adverts
computer acts files won't
strangely open
program that is bad for a computerUnit 9: Connected and sharing
Stay Accepting Tell
Safe Files Someone
Do not give out your Accepting emails, Tell an adult if
personal information files, pictures or texts someone or something
to people/places you from people you do makes you feel worried
not know can cause or uncomfortable.
problems.
Don’t
Reliable?
Meet Up Check information
Meeting someone before you believe it. Is
online can be the person or website
dangerous. telling the truth?
Always check with
an adult you trust.
Computer scientists have ways to protect your
information and computer devices. You will
learn about these in Stage 6!‘| Tick (~) true or false.
Statement
Data on one computer can be seen by a
computer on the network.
Sharing personal information is not safe.
One of the biggest online risks is the
sharing of personal information.
Copy the sentences. Fill in the blank space with the correct
word(s). Words can be used more than once.
emails address malware
a If you download your computer acts strangely.
b Your is an example of personal information.
c You share information when you send
d can cause harm to your computer.
_ | Tick (W) the statements that are true.
(Sharing information on a network has benefits. )
| » Devices connected to a network cannot share information
stored on the individual computers with each other.
| © Sharing information on a network can cause harm
to the data stored on your computer.
|
\ oe eee as
130| © Sharing information on a network cannot put the |)
computer at risk.
your data, it is easy to know how many people have
j Once people who do not have permission have seen |
looked at it.
~ Draw an icon for a device connected to a network
with wires.
|
|
| ~ Draw an icon for a device connected to
_ anetwork without wires.
- " ae
© How can people without permission
see personal information?
Challenge yourself!
a i]
1 Draw one icon to show the internet is available on a device.
2 Draw one icon to show the internet is not available on a device.
3 Point to the pictures that show personal information.
My phone number My robot toy
4 Tell your partner one more example of personal information.
131Connected and sharing
Unit
4. Create a flyer that shows what information can be shared
on the internet. Which devices might you use to share that
information? Choose the correct pictures from those shown
below to add to the flyer.
-
a_i
Sending emails
)
Sending instant messagesUnit 9: Connected and sharing
bei
Chatting with a friend
on social media
Writing a letter
2 Draw a poster to show that a computer may have malware. Tell
your partner what malware is and what the poster is showing.
What can you do?
Read and review what you can do.
¥ Iknow when a network is and is
not available.
v¥ I know about the risks of sharing
information.
Great job! Now you
know about icons and
the risks with networks.itimty Bea storyteller
Creating stories
Get started!
Work in pairs. Tell your partner what you think this story is about.
©
@
You will learn:
to predict what algorithms do
to regularly test programs while _
writing them
to debug programs.
In this unit, you
will test and debug
programs.it 10: Be a storyteller
Look at the path the sailor takes to the treasure.
B Move3stesup 3 |
ec.
C Move 3 steps left 3¢€ e =
8
D Move 5stepsdown 5 e@ Ti Sor ane
Do you remember?
Before starting this unit, check that you can:
© create algorithms as programs
plan the instructions for characters within programs.
In this unit, you will use ScratchJr.
There is an online chapter all about ScratchJr. =)
nic}Keywords
output: the results of
an algorithm
input: the data that is
given to an algorithm
Input and output
Predicting algorithm output
im
To predict the output of an algorithm, we must:
« input data
* carry out each instruction in the algorithm.
Look at the algorithm below. It adds two numbers and then shows
the total.
If we enter 5 as the first
©) Start program ae ee
© Enter the first number and 3 as the second
number
© Enter the second number
© Add the first and second numbers
the algorithm adds 5
and 3
which is 8.
(8)
The output is 8.
_ © Show the answer
© Stop program
We work through the steps of the algorithm,
using the data, just as the computer would.Look at these two algorithms.
Predict the output of each
algorithm if we input the
number 4 for both.
Algorithm A
Compare your answers
with your partner.
Algorithm B
@ Start program
@ Start program
4
@ Enter a number
¥
@ Enter a number
¥
@ Add3 i
Y
© Subtract 1
¥
© Multiply by 2 2)
¥
© Multiply by 2
v
© Subtract the number by 4 }
¥
@ Add 2
© Multiply by 2 a
¥
© Multiply by 2
¥
(@ Adds
¥
@ Subtract 2
v
© Show final number
¥
(® Show final number
¥
@ Stop program
¥
© Stop programTesting programs
eth)
Programs should be tested while we write them.
By testing programs while writing them, we can:
~ keep checking the results are correct
» test smaller groups of code
» stop errors being repeated.
Example of testing a program regularly
This algorithm is for the Person character. The algorithm has two
parts. Part 1 is shown below.
‘Port 1 ees
©) Start on Green Flag
Say “Hi, welcome!”
Say “My name is Mr Williams.”
Send Orange Start Message
©eo0o
Stop program
We can create the code for
Part 1 and test it.
The code for Part 1 is shown below.We can test this code by tapping the Start on Green Flag block.
We find an error. The second block does not match Step 2.
We correct the second block as seen below.
Part 2
©). Start on Red Message
© Say “Hi nice to meet you.”
Since we have corrected the
| | error now, we will have fewer
_ Send Blue Start Message errors to fix at the end!
© Stop program
The algorithm for Part 2 is shown above. The code for this
algorithm is:
We can test this code by tapping the Start on Red Message block.
It matches the algorithm and has no errors.
When we test the whole program, there are no errors. This is
because we have already tested Parts 1 and 2 separately.
139aE OED al
‘1 Open anew project and add any Background.
2 Add a Child character.
a ad! {d code to match the | Part 3) 3 algorithm and test it.
“Part 3
eo Start on Orange on tora as
Say “Hi, my name is
e Mary.”
© Send Red Start Message
© Stop program
4 Add code to a second character to match the Part 4 algorithm
and test it.
@ Start on Blue Message
Say “Nice to meet
e you too.”
© Jump (2)
@ Stop program
5 Test the whole program to make sure it
works correctly.
You tested the program as you created it, so it
is more likely that the whole program is correct.
140Unit 10:
astoryteller
Debugging programs
ett)
Programs may have errors if they are not written correctly.
We debug programs so that they give the results we want.
To debug a program, we need to find which part of the code does
not give the correct result.
Look at this algorithm and program created for a Person character.
Sea ‘Step I Instruction |
oe Start on Green Flag
|@ | Move right (3)
le Say “Hi, how are you?”
© Send Green Start Message
© Stop program * If you compare the
algorithm to the
program, you should
notice that this
/
code has two errors.
We can change the two blocks that contain errors. Now the code
matches the algorithm.
Fos,
» We changed 4 to 3 in the Move Right block.
» We changed the Send Orange Start Message block to the Send
Green Start Message block.
roaUnit 10:
a storyteller
In this activity, you will practice
debugging by yourself!
1 Open anew project and add any Background.
2 Adda Person character.
3 Add the correct code for the algorithm on the previous page.Look és the algorithm below for the second Person character.
‘s Step Instruction
Start on Green Message
Move left (2)
Say “Hi, I’m great!”
Say “How about you?”
ecco
Stop program
5 Add the code below to the second Person character.
Hi, Tm? 1 | How
6 Debug the code above.
7 Add more code to the second Person character to match the
Soot below.
Step 1 | Instruction
@ Start.on Green Flag
@ Turn Right (1)
@ Jump (2) | _ Remember to test your
@ Turn Left (1) | _code as you create
eee your program.
& Test and debug the whole program.
9 Compare your program with your partner.
at)Wet eT Role
Continue the program from the Go further activity as follows.
‘1 Add a second page to your project. (Your teacher can help you.)
2 Add this code to the Child 1 character on the first page:
Can you guess what
this code means? $
3 Add the same Child 1 character as before to the second page.
4 Adda third Child character (Child 3) to the second page.
5 Add code to the characters to match the algorithms below.
|Page 2: Child 1 Character | “Page - Child 3 Character :
| oe “Start on Tope | CJ _ Start on Red Message
e. Say “Have you been e Say “Yes, I used them
| using my crayons?” | yesterday to draw.”
ee Send Red Start 06 _Jump (2)
ae - @ Stop program
| @ Stop program Pama
6 Test and debug your code while writing it.
Your program should look something like this:
Have you been using my Seopa hr
Cees Nee ee1 What is the output of the algorithm below if the input
number is 3?
Start program
Enter a number
Multiply the number by 2
| Show final number
Stop program
Open a new project with 2 pages.
Add a Penguin character to Page 1.
Create a program to match the
@ | Start on Green Flag
@ Move left (3)
[ e | Go to Page 2 -
Test and debug your code.
Add a Penguin and Polar Bear character to Page 2.7 Debug the code y
‘ou added to match the algorithm below.
| @ Starton Tap _ a
| @ Move right (1)
eo “Play pop sound
_@ Say “Hi, Mr Penguin.” _ Test your code regularly
© Jump (2) ee while you create your
|_@ (Stop program _ program.
Did you know?
The first electronic digital computer could run different programs.
Tt was operated by six women.
What can you do?
Read and review what you can do.
v Ican predict what algorithms do.
V Iknow why I should regularly test
programs while writing them.
¥ Icandebug programs.
Good job! Now you
can test and debug
programs.
at)‘Viiiay Computers and robots
Who is quicker?
Get started!
Talk about the following with a partner:
Your friend adds two numbers together without using a calculator.
You add the same numbers using a calculator.
Who would get the answer first?
Now imagine there are ten numbers to add together. Who would
get the answer first?
You will learn:
e about tasks computers can do better than humans
e that people use different types of computer devices
e about robots in fiction and real robots. |
In this unit, you will learn about things robots r
and computers can do. =4 )
_Unit 11
Work in groups.
a ee
Help Gina name the different types of computers shown above.
Name two jobs shown in the picture below.
Discuss with your partner if you think people use computers in
these jobs. What do they use them for?
flies Sk
mputers and robots
Before starting this unit, check that you:
e can explain what basic hardware and software can do
e know computers are used for different things
e know what a robot is and where they may be found.Computers and humans
Computers can do some things better than humans.
Computers can perform tasks for a long time
Computers do not get tired. Computers do not get bored. They do
not need to take a break.
Computers store a lot of information
Computers can store lots of information in a small space.
A single computer can store a whole library of books!
Computers do as they are told
Computers follow instructions. They do not make mistakes.
Mistakes are due to humans.Computers are fast
Computers are very fast. They can perform millions of tasks
every second.
They can add numbers much quicker than humans.
A teacher marks tests for the whole school.
She has to remember each student’s score.
a Do you think a computer is better at
marking tests?
b Do you think a computer is better at
remembering scores?
Sara tries to build a doll house. However,
she does not follow the instructions. The
doll house falls apart. What went wrong?
Tick (%) the correct answer.
e There was an error in the instructions.
e The instructions were not followed. )
Billy believes he can draw a house faster
than a computer. Is Billy right?
Work in groups of four. Explain three
things that computers can do better
than humans.Choosing computer devices
People choose computer
devices for different reasons.
Their location
If someone sits at a desk
for many hours each day,
they may prefer a desktop
computer,
A desktop is larger, heavier
and not easy to move.
Laptops, tablets and
smartphones are smaller,
lighter and easy to move. If
someone is moving around,
they may prefer these
portable devices.
Smartphones can connect
to the internet anywhere.
The purpose
The choice of device
depends on what it is being
used for.
A delivery driver uses
a tablet.
A tablet is easier to carry
than a laptop. It has a bigger
screen than a smartphone.
ae)A graphic designer needs a powerful computer. They use a desktop
computer as they are more powerful. They have large screens.
a = ge =
Se
=
Attaching other devices
Sometimes people need to attach devices to their computer.
A laptop or desktop can connect to a mouse and keyboard.
Battery
How long does the battery last?
Laptops — will need recharging
more than once a day.
Tablets — will need recharging
once a day.
Smartphones — can last more
than a day before recharging.
ats)mputers and robots
— hh
Discuss the following with your partner.
| Annay’s brother needs a new computer device.
He needs a device that:
e is light and easy to carry around
e has along battery life.
Point to the device you would choose for him.
ea, B
si
A
2 Jin’s sister takes photographs. She needs to connect a
digital camera and printer. She needs a computer to
connect to the camera and to print out images.
Point to the device you would choose for her.
iene
|it 11; Computers and robots
3 Some devices are easier to move than others. Arrange the
devices below from easiest to carry to hardest to carry.
Easiest Easier
EE
t laptop s smartphone
—/11: Computers and robots
Robots: real or fictional?
ee
Do you remember what a robot is?
=~
A robot is a machine that can do a task without any help.
You may have seen robots in movies.
Robots in movies are not real. Things that are not
real are called fictional.
Fictional robots often:
» look like humans
~ speak like humans
~ act a bit like humans. ;
This picture shows a fictional robot. This robot does %
not really exist.
Real robots:
do not always look like humans
may not speak at all
repeat the same tasks or actions
do not act like humans.Some examples of real robots are shown below.
These robots are found in factories.
This robot cuts grass.
A feaae aera ery
Keywords |
robot: a machine that
does a task without
| the help of a person
| fictional: not real —
make believeUnit 11: Computers and robots
Say if the following statements are true or false.
Statement True or false?
a Arobot can feel sad.
A robot can go into space.
Robots cannot do dangerous work. f
Areal robot can make cars.
All robots look like humans.
After watching a movie on
television, Vicki believed
that all robots are real.
Explain to Vicki that
some robots are fictional
while some are real.
Give some examples of
the differences between
real and fictional robots.
With a partner, choose
one of the robots shown and say whether it is fictional or real.
Explain your answer. wo_ | Jessie uses a broom to clean. Dana says that a robot vacuum
cleaner can do a better job. Do you think she is correct?
Explain your answer.
Danny uses his computer to design things.
_ Work in groups. Which device do you think Danny should use?
_ Explain why you chose that device.
OOD as
* Do these robots look real or fictional? Give a reason for
your answer.ye eT Soler
Work with a partner.
1 What is a fictional robot?
2 Can you name two robots in movies that are fictional?
3 Jon and Jeff are searching for information. Jon uses a search
engine on a computer. Jeff goes to the library and looks for books.
a Whowill find information first?
b Whowill find more information?
4 Anton travels for work. Pedro works in his office. Anton uses
a laptop.
a Why do you think Anton chose a laptop? Choose two
reasons from this list:
A laptop.is heavy. A laptop is easy to move.
A laptop screen is bigger than a tablet.
Anton does not need a keyboard.
Which type of computer should Pedro use? Explain why.