Flowchart Topical
Flowchart Topical
⬜
Sunday, September 3, 2023 2:23 PM
2210 Page 1
a) Complete the trace table for the input data:
50, 33, 18, 15, 30, –1, 45, 12, 90, 6 [4]
2210 Page 2
b) Any two correct statements e.g.
• The program outputs a value
• That is divisible by 6 // 2 and 3
Q. 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.
2210 Page 3
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)
Ans.
a) One mark for correct input (PointsWon and PointsLost)
One mark for correct calculations (Difference)
One mark for correct output
Ans.
2210 Page 4
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]
Y Z A Output
2210 Page 5
To see if the larger number is a multiple of the smaller number
To see if the smaller number is a factor of the larger number
Ans.
2210 Page 6
a) Complete the trace table for the input data:
50, 75, 99, 28, 82, 150, –1, 672, 80 [4]
b) Describe the purpose of the algorithm. [2] (Q5/21/M/J/21)
Ans.
a) One mark for each correct column (Max 4)
2210 Page 7
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)
2210 Page 8
Ans. One mark for each correct column
2210 Page 9
Q. 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)
Ans.
a) One mark per mark point, max six
2210 Page 10
a) One mark per mark point, max six
• MP1 input box
• MP2 correct check of score
• MP3 assign Score to Pass correctly
• MP4 assign Score to Fail correctly
• MP5 increment both arrays correctly
• MP6 correct check of number of scores
2210 Page 11
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]
2210 Page 12
b) Include a message to explain the value output / e. g. “The
percentage of meals not served” // outputting Hot, Cold and
Serve
c) updating the Serve variable // Serve <-- Serve + 1
Complete the trace table for the algorithm using this input
data:97, 876, 4320, 606, 9875, 42, 124
2210 Page 13
[5] (Q6/22/O/N/22)
Ans. One mark per mark point, max five
• MP1 correct Counter and Number columns
• MP2 correct Hundreds column
• MP3 correct Temp and Tens columns
• MP4 correct Units column
• MP5 correct OUTPUT column
2210 Page 14
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)
Ans.
a) One mark for each column, max four
2210 Page 15
b) One mark per mark point, max three
• input a number / quantity
• … check that the number is less than (or equal to) the number
in stock
• … after checking for N
• update Stock by that number / Stock Stock – Number
• update Total by that number / Total <-- Total + Number
a)
2210 Page 16
2210 Page 17