Video Resources
Computational Thinking Explained
How to create a Flowchart
State Examination 2024
Question 4
6 marksFigure 1 shows a row of black and white discs with their position numbers shown under each square. There are only two ways to move a disc:
- Move into an empty square: one position to the left or right, for example, 1 → 2 means move the disc from square 1 to square 2.
- Jump in either direction over a single adjacent disc into an empty space immediately beyond, for example, 3 → 1 means move the disc from square 3 to square 1, jumping over a disc in square 2.
Figure 1 (Start State)
Write a sequence of steps, or an algorithm, that swaps all the white discs with the black discs so that the row looks like that shown in Figure 2. You can only move a single disc in each step.
Figure 2 (End State)
State Examination 2024
Question 11
6 marks(a) Apply the algorithm shown in pseudo code below to the row of shapes shown in Figure 4 and illustrate your answer in the boxes provided. (4 marks)
Figure 4 (Initial State)
(b) The algorithm described in part (a) provides a general solution to the problem it solves. Explain what is meant by the phrase 'a general solution'. (2 marks)
State Examination 2024
Question 14
9 marksThe flowchart, shown in Figure 6 below, describes an algorithm that reads two values, swaps them, and then displays their new values.
Figure 6
(iii) Flowcharts are commonly used in the design process to describe algorithms. State one advantage and one disadvantage of using flowcharts.(4 marks)