Flowchart Questions
Flowchart Questions
1|P ag e
2. The flowchart represents an algorithm.
The predefined function DIV gives the value of the result of
integer division, for example, y ← 9 DIV 4 gives y a value of 2
An input value of –1 ends the algorithm.
a) Complete the trace table for the input data: 50, 33, 18, 15, 30, –1, 45, 12, 90, 6 [4]
2|P ag e
b) Describe the purpose of this algorithm. [2] (Q5/21/M/J/20)
_____________________________________________________________________________________
_____________________________________________________________________________________
3. This flowchart inputs the points won and the points lost when playing a game. The difference
between the points won and lost is calculated and depending on the result the player can: move up to
the next level, stay at the same level, or move down to the previous level. The flowchart finishes when
the input for points won is –1.
a) Complete a trace table for this set of input data: 5000, 4474, 6055, 2000, 7900, 9800, 3000, 2150, –1,
6700, 7615 [3]
3|P ag e
b) The flowchart needs to be changed. When the difference is more than 5000 the output message is
‘Fantastic leap up two levels’. Describe the changes that will need to be made to the flowchart. [3]
(Q4/22/M/J/20)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
5. This flowchart represents an algorithm that allows the input of two numbers and performs a
calculation. The predefined function MOD finds the remainder from integer division for example X 8
MOD 5gives X a value of 3.
4|P ag e
a) Complete a trace table for this set of input data: 11, 4, 6, 2, 3, 9, 3, 2, 2, 6, 0, 0, 1, 1 [4]
6. Draw the most appropriate flowchart symbol for each pseudocode statement. [3] (Q3a/22/M/J/21)
5|P ag e
7. The flowchart represents an algorithm. The algorithm will terminate if –1 is entered.
6|P ag e
a) Complete the trace table for the input data: 50, 75, 99, 28, 82, 150, –1, 672, 80 [4]
7|P ag e
8. The flowchart represents an algorithm.The algorithm will terminate if –1 is entered at the List input.
8|P ag e
Complete the trace table for the algorithm using this input data : 2, 77, 2, 16, 1, 35, 2, –7, 5, 18, 1, 11, 1,
12, 2, 20, –1, 18 [5] (Q5/22/O/N/21)
9|P ag e
9. The flowchart shows an algorithm that should allow 60 test results to be entered into the variable
Score. Each test result is checked to see if it is 50 or more. If it is, the test result is assigned to the Pass
array. Otherwise, it is assigned to the Fail array.
a) Complete this flowchart. [6] (Q4a/21/M/J/22)
10 | P a g e
10. This algorithm checks the temperature of hot food being served to customers.
11 | P a g e
a) Complete the trace table for the algorithm using this input data: 75, 78, 84, 87, 91, 80, 75, 70, 65, 62,
–1, 20 [7]
b) State how the final output from the algorithm could be improved. [1]
_____________________________________________________________________________________
12 | P a g e
11. This flowchart represents an algorithm to divide three-digit numbers into hundreds, tens and units.
The pre-defined function DIV gives the value of the result of integer division, for example Y = 9 DIV 4
gives the value Y = 2 the pre-defined function MOD gives the value of the remainder of integer division,
for example R = 9 MOD 4 gives the value R = 1
13 | P a g e
Complete the trace table for the algorithm using this input data:97, 876, 4320, 606, 9875, 42, 124
[5] (Q6/22/O/N/22)
12. This algorithm makes sure that there are enough wheelbarrows in stock.
14 | P a g e
a) Complete the trace table for this algorithm using this input data: "Y”, “Y”, “Y”, “Y”, “Y”, “Y”, “N” [4]
b) Explain how you could extend the algorithm to allow for the sale of more than one wheelbarrow at a
time. [3] (Q4/23/O/N/22)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
15 | P a g e
13. a) Draw a flowchart for an algorithm to:
• allow numbers to be input
• ignore any numbers that are negative
• Count how many numbers are positive
• output the count of positive numbers when zero is input and end the algorithm. [6]
b) Explain the changes you will make to your algorithm to also count the negative numbers. [2]
(Q5/2210/02B/SP/23)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
16 | P a g e