Question 9 2023 · October-November · Paper 12 · 8 marks
Reveal official mark-scheme answer
Official answer for Question 9
Question 8
Show text version of question
Question 9
Sukhjinder, a mathematics student, has defined a procedure using pseudocode. It calculates the area of a parallelogram by multiplying the base by the height. All parallelograms will have an area of less than 1000.
The procedure Sukhjinder has written is:
PROCEDURE parallelogram(base,height) area base*height ENDPROCEDURE
He has also begun writing an algorithm which calls the procedure and then passes back the area.
The main algorithm accepts inputs of the base and the height of 10 parallelograms, one at a time. It will output the areas of the largest and smallest parallelograms.
Complete the algorithm for Sukhjinder by filling in the missing lines.
count 0 smallest 1000
.......................................................................................................................................................... WHILE count < 10 INPUT base, height
.......................................................................................................................................................... IF area < smallest THEN
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
.......................................................................................................................................................... ENDIF
..........................................................................................................................................................
..........................................................................................................................................................
....................................................................................................................................................
Question 10
Why this question appears here
80% assigned-topic match · Algorithms and flowcharts › Algorithms and flowcharts
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9626_w23_qp_12.pdf
