Past-paper question · 2023 October-November · Paper 13 · Q9

Question 9 2023 · October-November · Paper 13 · 8 marks

Original past-paper question for 9
Reveal official mark-scheme answer Official mark-scheme answer for 9

Official answer for Question 9

Question 8

✓
W←X/Y
✓
Z=INT(W)
✓
IF W=Z
✓
THEN
✓
PRINT/OUTPUT Y, “ (e.g.)is a factor of ”,X
✓
ELSE
✓
PRINT/OUTPUT Y, “ (e.g.)is not a factor of ”,X
✓
ENDIF
✓
Eight from:
✓
•
✓
INPUT X (1) Y (1)
✓
•
✓
Correct IF statement (1)
✓
•
✓
IF and ENDIF indented correctly (1)
✓
•
✓
Use of THEN (1)
✓
•
✓
Valid output statement (1) with both commas (1) with speech marks (1)
✓
•
✓
Use of ELSE (1)
✓
•
✓
THEN and ELSE indented correctly (1)
✓
•
✓
Valid output statement after ELSE (1) Commas between values and text
✓
in second statement text within speech marks (1)
✓
•
✓
Correct use of ENDIF (1)
✓
•
✓
No further code after ENDIF statement (1)
✓
Cambridge International AS & A Level – Mark Scheme
✓
9626/13
✓
October/November
✓
PUBLISHED
✓
2023
✓
Question
✓
Answer
✓
Marks

Mark scheme 9626_w23_ms_13.pdf →

Show text version of question

Question 9

A
programmer is writing an algorithm in pseudocode to determine whether a number is a factor of

another number.

Y is a factor of X if the result of X/Y is a whole number.

In pseudocode INT(W) returns the whole number part of W. If W is the same as INT(W) that means W is a whole number.

Complete the algorithm, including the missing first line, in pseudocode. Each THEN or ELSE statement should be on a separate line to the action resulting from it. The algorithm uses:

  • W to store the result of X divided by Y
  • Z to store the value of INT(W).

The algorithm must output the values of Y and X together with an appropriate message if Y is a factor of X or if Y is not a factor of X.

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

W←X/Y

Z=INT(W)

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

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

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

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

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

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

[8]

Question 11

Topic relevance

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_13.pdf

Keep practising this topic