Question 3 2015 · October-November · Paper 22 · 6 marks
Reveal official mark-scheme answer

Official answer for Question 3
Question 22
Show text version of question
Question 3
Regular customers at a supermarket use a rewards card at the point-of-sale.
Points are calculated from every transaction and added to the points total stored on the card.
One reward point is given for every $1 spent.
When the points total exceeds 500, the customer can either:
- pay the full amount due and increase their points total
- get $1 deducted from the amount due in exchange for 500 reward points
The new points total and amount to be paid is printed on the receipt.
- read the points total from the card
- process the amount spent
- output the amount to be paid and the new points total
earned from the amount spent.
Study the following pseudocode:
INPUT AmountDue NewPoints ← CalculatePoints(AmountDue) PointsTotal ← PointsTotal + NewPoints
IF PointsTotal > 500 THEN OUTPUT "Exchange points?" INPUT Response IF Response = "YES" THEN PointsTotal ← PointsTotal – 500 AmountDue ← AmountDue – 1 ENDIF ENDIF
OUTPUT AmountDue, PointsTotal
The algorithm is also to be documented with a program flowchart.
Complete the flowchart by:
- filling in the flowchart boxes
- labelling, where appropriate, lines of the flowchart
Question 5
CALL CalculatePoints(AmountDue)
Question 6
Why this question appears here
82% assigned-topic match · Algorithm design and problem-solving › Algorithms
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 9608_w15_qp_22.pdf
