Algorithms - KS4
Algorithms - KS4
algorithms
KS4 - Algorithms
Starter activity
Building Lego
Question:
Do you think that everyone's finished
product will look the same? Why?
2
Objectives
● Identify algorithms that are defined as written descriptions, flowcharts and code
3
Activity 1
Algorithms
4
Activity 1
What do you think the difference is between an algorithm and a computer program?
5
Activity 1
6
Activity 2
Representing algorithms
In computer science, algorithms can be represented in a number of ways, not only in a
programming language.
For instance, you can use flowcharts and written descriptions to help you to focus on
the logic of a solution without worrying about syntax errors.
7
Activity 2
Flowcharts
Start
End
8
Activity 2
Written descriptions
Start
End
9
Activity 2
Computer program
Start
year_born = int(input())
current_year = int(input()) result = current_year - year_born
End
10
Activity 3
Creating flowcharts
11
Activity 3
Flowchart symbols
Start welcome
Terminators are used for the start and Subroutines are represented by a
end of subroutines or programs. rectangle with two lines either side.
Arrows are
used to show the direction and flow of the
program.
12
Activity 3
Flowchart symbols
Output “Hello
Input name
world!”
13
Activity 3
14
Activity 3
15
Activity 3
16
Activity 3
Output
“Heads or Tails?”
Input choice
17
Activity 3
Input choice
18
Activity 3
19
Activity 3
20
Activity 3
21
Activity 3
Dice roll
22
Plenary
23
Homework
24
Summary
Next lesson
25