Past-paper question · 2023 May-June · Paper 22 · Q2(b)

Question 2(b) 2023 · May-June · Paper 22 · 2 marks

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

Official answer for Question 2

Part (b)

✓
NumMonths 12 - MONTH(MyDOB)

Question 2

✓
One mark per underlined part
✓
9618/22
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9618_s23_ms_22.pdf →

Show text version of question

Question 2

Part (b)

Question 2

A program stores a user’s date of birth using a variable MyDOB of type DATE.

Part (b)

MyDOB has been assigned a valid value representing the user’s date of birth.

Write a pseudocode statement to calculate the number of months from the month of the user’s birth until the end of the year and to assign this to the variable NumMonths.

For example, if MyDOB contains a value representing 02/07/2008, the value 5 would be assigned to NumMonths.

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

[2]
Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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 9618_s23_qp_22.pdf

Keep practising this topic