Past-paper question · 2022 May-June · Paper 22 · Q1(d)

Question 1(d) 2022 · May-June · Paper 22 · 6 marks

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

Official answer for Question 1

Part (d)

✓
One mark per mark point, max six

Question 6

✓
MP1
✓
initialise a running total for the cost of the booking
✓
MP2
✓
input (with prompt) the number of tickets
✓
MP3
✓
… attempt to identify type of ticket
✓
MP4
✓
… add the cost of tickets to the running total
✓
MP5
✓
ability to book several types of ticket
✓
MP6
✓
attempt to check that the number of children booked is less than or equal to twice the number of adults
✓
MP7
✓
attempt to identify type of attraction
✓
MP8
✓
input with prompt the number of selected attractions required
✓
MP9
✓
… check that this number is not greater than the total number of tickets booked
✓
MP10
✓
… add the cost of the attractions to the (running) total
✓
Example answer
✓
TotalCost 0
✓
TotalPeople 0
✓
OUTPUT "Do you want single tickets? Y/N"
✓
INPUT Single
✓
IF Single = "Y"
✓
THEN
✓
FOR Type 1 TO 3 // adults, children and seniors
✓
REPEAT
✓
Flag True
✓
OUTPUT "How many ",TicketDecription[Type], " tickets"
✓
INPUT NumberOfTickets[Type]
✓
IF Type = 2
✓
THEN
✓
IF NumberOfTickets[2] > 2 * NumberOfTickets[1]
✓
THEN
✓
Flag FALSE
✓
OUTPUT "Too many children"
✓
ENDIF
✓
ENDIF
✓
UNTIL NumberOfTickets[Type] >= 0 AND Flag
✓
TotalCost TotalCost + TicketPrice[Type] * NumberOfTickets[Type]
✓
0478/22
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2022
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s22_ms_22.pdf →

Show text version of question

Question 1

Part (d)

Question 1

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

Part (d)

Write an algorithm for the part of Task 2 that inputs the tickets and extra attractions required

then calculates the total cost of the booking.

Assume that the booking is for a single day.

Use 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 0478_s22_qp_22.pdf

Keep practising this topic