Past-paper question · 2023 October-November · Paper 23 · Q4(b)

Question 4(b) 2023 · October-November · Paper 23 · 5 marks

Original past-paper question for 4(B)
Original past-paper question for 4(B)
Reveal official mark-scheme answer Official mark-scheme answer for 4(B)

Official answer for Question 4

Part (b)

✓
One mark for each point (max five)

Question 5

  • use of loop for check
  • checking for whole number
  • checking for number greater than or equal to one
  • … and less than or equal to six
  • Appropriate error/reinput message
  • ability to reinput value
✓
Example:
✓
WHILE Seats < 1 OR Seats > 6 OR Seats <> ROUND(Seats, 0) DO
✓
OUTPUT "Please enter a valid number of seats "
✓
INPUT Seats
✓
ENDWHILE

Mark scheme 2210_w23_ms_23.pdf →

Show text version of question

Question 4

Part (b)

Question 4

A programmer is writing a data entry program for booking theatre seats.

The programmer needs the program to accept only whole numbers that are greater than or equal to one and less than or equal to six.

Part (b)

Complete this pseudocode to perform your two validation checks, using your answers given

in (a):

OUTPUT "Please enter the number of seats you want to book "

INPUT Seats

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

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

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

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

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

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

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

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

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

[5]
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_w23_qp_23.pdf

Keep practising this topic