This sequence enables students to:
identify and explain what the basic visual blocks do in a program
create a program that executes steps in a specific order
create a basic program where the sprite (character) responds to user input.
Introducing Algorithms
Introducing Algorithms
Curriculum Links
Digital systems can be created and controlled
Follow and describe algorithms involving a sequence of steps, branching (decisions) and iteration (repetition)(AC9TDI2P02) .
Follow and describe algorithms involving sequencing, comparison operators (branching) and iteration (AC9TDI4P02) .
Implement simple algorithms as visual programs involving control structures and input (AC9TDI4P04) .
Implement simple digital solutions as visual programs with algorithms involving branching (decisions) and user input (ACTDIP011 ).
ST2-DDT-02
designs and uses algorithms, represents data and uses digital systems for a purpose
· Use core features of common digital tools to locate, select, store and retrieve relevant information
· Use core features of common digital tools to share content, plan tasks and collaborate safely following an agreed code of conduct
· Design algorithms that use branching and iteration to document and program a procedure
· Explore how data can be represented by letters, numbers, symbols, images and sounds depending on the purpose
· Select, enter and represent different types of data using digital tools
Introducing Algorithms
Learning hook
Writing a sequence of instructions (algorithms) – whole class activity
1. Ask students to consider everyday tasks with a sequence of steps (for example, preparing to play a game using PlayStation, making a sandwich, fixing a puncture on a bicycle tyre, making a cake).
2. Ask students to suggest a sequence of steps for cleaning teeth. Remind them to sequence the steps in a logical order.
3. Rearrange the sequence of steps for cleaning teeth. Support students to understand why order is important when undertaking some tasks. Ask students if they can identify tasks where the order of instructions is very important.
Provide the class with the steps involved in making a vegemite sandwich (out of correct order). Ask students to arrange the instructions in the correct order.
o Spread vegemite across the surface of the bread
o Cut the sandwich in half
o Take two slices of bread from the packet
o Spread butter across the surface of the bread
o Place the two slices of bread together
4. Give the class a list of everyday tasks. Ask students to select one task and independently write the steps necessary to complete the task.
Examples include:
o Locate and download an app
o Create and name a new folder on the desktop
o Make a paper plane
o Wash the dog
o Fix a bicycle tyre puncture
o Make a cup of Milo
Learning map and outcomes
Graph paper programming
Explain that an algorithm is a list of steps that can be followed to complete a task.
Share the learning intentions for the lesson. For example:
Today we will …
...design a sequence of steps (using words and symbols) for others to follow
…follow and describe algorithms
…evaluate the sequences of others to determine if the outcome was successful
Learning input
Dare to square game
1. Model the ‘Dare to square’ game.
2. Ask students to work in pairs. Provide students with a 4 x 4 grid with two black squares (Grid 1). Explain that the goal is to provide instructions to direct a partner to colour the specific squares within a grid.
For example:
Example grid 1
Suggestion:
a. Move one square to the right.
b. Colour the square
c. Move one square to the right.
d. Move one square down.
e. Colour the square.
Or:
f. Move one square to the right.
g. Colour the square.
h. Move diagonally to the right.
i. Colour the square.
3. Provide each student with Example grid 2. Ask them to create a set of instructions to colour the correct squares.
Example grid 2
4. After students complete the activity, invite them to share their instructions.
5. Display the instructions for all to view. For example:
a. Move one square to the right.
b. Colour the square.
c. Move one square to the right.
d. Move one square to the right.
e. Colour the square.
f. Move one square down.
g. Move one square to the left.
h. Colour the square.
i. Move one square to the left.
j. Move one square to the left.
k. Colour in the square.
l. Move one square down.
m. Move one square to the right.
n. Colour the square.
o. Move one square to the right.
p. Move one square to the right.
q. Colour the square.
r. Move one square down.
s. Move one square to the left.
t. Colour the square.
u. Move one square to the left.
v. Move one square to the left.
w. Colour the square.
6. Explain that these instructions would take a long time to write and even longer for a larger grid with more coloured squares.
Ask students to consider an easier and more effective way to provide the instructions. For example, could they use symbols?
Support the students to consider the use of arrows.
7. Provide the following suggestion:
Move one square right
Move one square left
Move one square up
Move one square down
Colour the square
*The program should look like this:
Ask students to imagine they are providing the instructions to a computer. Tell them their task is to use the arrow symbols to provide the instructions instead of the words used previously.
Provide time for each student to use the arrow symbols to create a program instructing the computer to colour the correct squares on the grid.
Learning demo
Think, pair share
1. Ask students to arrange themselves into pairs.
2. Provide each pair with Worksheet 1: Dare to square.
3. Explain that each pair will need to view the images on the worksheet. Using the arrow symbols, convert a sequence (algorithm) into a program for others to follow to ensure the correct squares on the grids are coloured.
4. Invite students to swap programs with other groups.
5. Provide each pair with blank grids and instruct the students to follow the programs to colour the squares on each grid.
6. Ask students to create their own versions of the grids and invite other students to provide instructions to complete the tasks.
7. Introduce the command repeat. Have the students consider how they can reduce the number of steps by including ‘repeat’ in the algorithm. For example, ‘move one square to the right, colour the square, repeat’.
Learning Consolidation
1. Play a game that involves physical activity and following instruction such as ‘Rob the nest’.
Rules:
1) Organise 4 teams, each team has an empty hoola hoop. A central hoola hoop is filled with 8-10 bean bags.
2) One player from each team is selected to take a bean bag from the central hoola hoop until it is emptied. They then take from another team’s hoola hoop and place it in their own hoop.
3) A player is only allowed to take one bean bag at a time, and must run back to their own hoola hoop and drop it in.
4) Players cannot guard or defend your own hoola hoop.
5) The team with the most balls in their hoola hoop at the end of the game is the winner.
2.
3. Working in pairs, students write an algorithm to show the steps to play the game. Use if/then statements when describing the action if the central hoop is emptied. Students may use a repeat or loop command. Share the completed algorithms and follow selected examples to see if the steps can be followed to play the game.
4. Lead students to understand the importance of making sure instructions are clear and explicit enough to be followed. This could be a timed activity with the winning pair being those students who were able to retrieve the objects from the nest first or in the least amount of time.
Learning reflection
Encourage students to reflect on the task and share thoughts.
Highlight the positive behaviours observed during the lesson and revisit learning intentions.