Past-paper question · 2021 May-June · Paper 22 · Q1(c)

Question 1(c) 2021 · May-June · Paper 22 · 6 marks

Original past-paper question for 1(C)
Original past-paper question for 1(C)
Original past-paper question for 1(C)
Reveal official mark-scheme answer Official mark-scheme answer for 1(C)

Official answer for Question 1

Part (c)

✓
Any six from:

Question 6

✓
MP1 Input number of tickets
✓
MP2 Input train up mountain and train down mountain
✓
MP3 Suitable prompts seen for inputs that are included
✓
MP4 Check that tickets are available on selected train(s)
✓
MP5 If available calculate price of tickets …
✓
MP6 … calculation includes discount if required
✓
MP7 Update total passengers / seats available for a train
✓
MP8 Update total passengers / seats available for up train and down train
✓
MP9 Update total cost for a train
✓
MP10 Update total cost for up train and down train
✓
Example answers
✓
OUTPUT "How many tickets"
✓
INPUT NoTickets
✓
OUTPUT "Which Train up the mountain? 1, 2, 3 or 4"
✓
INPUT UpNumber
✓
OUTPUT "Which Train down the mountain? 1, 2, 3 or 4"
✓
INPUT DownNumber
✓
IF (DownNumber = 4 AND TrainUp[UpNumber] + NoTickets <= 480 AND TrainDown[DownNumber] +
✓
NoTickets <= 640) OR (TrainUp[UpNumber] + NoTickets <= 480 AND TrainDown[DownNumber] +
✓
NoTickets <= 480)
✓
THEN
✓
Cost ← (NoTickets – NoTickets DIV 10) * 50
✓
TrainUp[UpNumber] ← TrainUp[UpNumber] + NoTickets
✓
TrainDown[DownNumber] ← TrainUp[DownNumber] + NoTickets
✓
TrainUpTotal[UpNumber] ← TrainUpTotal[UpNumber] + Cost / 2
✓
TrainDownTotal[DownNumber] ← TrainDownTotal[DownNumber] + Cost / 2
✓
ENDIF
✓
2210/22
✓
Cambridge O Level – Mark Scheme
✓
May/June 2021
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_s21_ms_22.pdf →

Show text version of question

Question 1

Part (c)

Question 1

All variables, constants and other identifiers must have meaningful names.

Part (c)

Write an algorithm for the part of Task 2 that inputs the tickets required, calculates the total

price for the ticket(s) purchased by a passenger including a group discount (if applicable) and updates the data structures used for the totals. Use either pseudocode, programming statements or a flowchart.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Question 5

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

[6]

Question 6

Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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 2210_s21_qp_22.pdf

Keep practising this topic