Past-paper question · 2015 May-June · Paper 23 · Q4(b)

Question 4(b) 2015 · May-June · Paper 23 · 4 marks

Original past-paper question for 4(B)
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)

Part (b)

•

✓
A year that is divisible by 400 (TRUE)
✓
•
✓
A year that is divisible by 100, but not 400 (FALSE)
✓
•
✓
A year that is divisible by 4, but not 100 (TRUE)
✓
•
✓
A year that is not divisible by 4 (FALSE)
[4]
✓
Justification must match data value

Mark scheme 9691_s15_ms_23.pdf →

Show text version of question

Question 4

Part (b)

Question 4

A leap year is a year with special numerical properties.

Ahmed is planning to write a function to check whether a year is a leap year.

He starts by drawing a flowchart.

FUNCTION IsLeapYear(Year)

Is Year exactly No Is Year exactly No Is Year exactly No divisible by 400? divisible by 100? divisible by 4?

Yes Yes Yes

RETURN RETURN RETURN RETURN TRUE FALSE TRUE FALSE

ENDFUNCTION

Question 15

Part (b)

Ahmed wants to carry out white box testing of the function.

Give four integers which thoroughly test the function. For each one, give the expected return value and justify your choice.

Year Expected Justification return value

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

Question 1

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

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

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

Question 2

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

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

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

Question 3

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

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

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

Question 4

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

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

[4]
Topic relevance

Why this question appears here

71% assigned-topic match · Hardware › Logic gates and logic circuits

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 9691_s15_qp_23.pdf

Keep practising this topic