Question 1
1 markThe flowchart shows an algorithm that converts a distance in miles into kilometres, using 1 mile = 1.6 km.
State what should be written in the blank box.
Model answer
Km ← Miles * 1.6
Explanation
The box between the input and the output is the process: it must calculate the value that is output (Km) from the value that was input (Miles). A rectangle (process box) holds an assignment, so it uses ←. Each mile is 1.6 km, so the miles are multiplied by 1.6.
Mark scheme
-
1 mark
Km ← Miles * 1.6
accept Km ← 1.6 * Miles; the identifier Km must be used because it is output; do not accept = for assignment or Miles / 1.6