Computational Thinking and Data Structures: Question 6

Syllabus 9.2

Multiple choice AS 1 mark

A trainee programmer is drawing a flowchart, using the standard flowchart symbols, for an algorithm that reads a student's percentage score from the keyboard and then displays "Pass" if the score is 60 or more, or "Fail" otherwise.

The flowchart needs one box that tests whether the score is 60 or more, so that the flow of control can branch to one of two different paths depending on the result of that test.

Which flowchart symbol shape should be used for this box?

Choose an answer to check it, then compare with the worked solution below.

Show worked solution Hide worked solution

Worked solution

Recognising the decision symbol

In a flowchart, each symbol shape has one fixed, specific meaning:

  • A rounded oval (terminator) marks the single Start and single End of the algorithm.
  • A parallelogram marks an input or output step, such as reading a value from the keyboard or displaying a message on the screen.
  • A rectangle marks a process step, such as a calculation or an assignment of a value to a variable.
  • A diamond (rhombus) marks a decision (selection) step. A box that tests a condition and has at least two arrows leaving it, one for each possible outcome of the test.

The box described in the question tests whether the score is 60 or more and then branches the flow of control down one of two different paths depending on the result. Testing a condition and branching is exactly what a decision box does, so the correct symbol shape is the diamond (rhombus).

Why the other options are wrong

  • A (Rectangle): a rectangle is used for a process step that simply carries out an action (for example, working out a value), not for a step that tests a condition and branches the flow of control.
  • B (Parallelogram): a parallelogram is used for input and output steps, such as reading the score from the keyboard, or displaying “Pass” or “Fail” once the test has already been made, not for the test itself.
  • D (Rounded oval): the rounded oval (terminator) is reserved for the single “Start” symbol at the very beginning of the flowchart and the single “End” symbol (or symbols) at the very end, not for any step in between.

Final answer

C. Diamond (rhombus): this is the flowchart symbol used for a decision (selection) step that tests a condition and branches the flow of control.