Past-paper question · 2013 May-June · Paper 23 · Q2(c)

Question 2(c) 2013 · May-June · Paper 23 · 10 marks

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

Official answer for Question 2

Part (c)

Part (c)

✓
WHILE NOT EOF()
✓
FILEREAD next assignment record
✓
IF Mark > 70
✓
THEN
✓
COUNT Count + 1
✓
ENDIF
✓
ENDWHILE
✓
–
✓
Initialising Count
✓
–
✓
WHILE NOT(EOF)
✓
–
✓
ENDWHILE
✓
–
✓
IF Mark > 70 block
[4]

Mark scheme 9691_s13_ms_23.pdf →

Show text version of question

Question 2

Part (c)

Question 2

[4]

Question 4

Part (e)

Describe what the function EOF() does when used in a program. For

Examiner's Use

[2]

2 The data in each field is validated as it is entered.

Part (c)

The pseudocode given in

Part (b)

uses a REPEAT-UNTIL loop: For

Examiner's OPENFILE ExamResults FOR INPUT Use Count ← 1 REPEAT FILEREAD next ExamResults record IF Mark > 70 THEN Count ← Count + 1 ENDIF UNTIL EOF() OUTPUT Count CLOSEFILE ExamResults

Rewrite the pseudocode to count how many records have a mark below 40. This time use a WHILE-ENDWHILE loop.

OPENFILE ExamResults FOR INPUT

CLOSEFILE ExamResults

[4]

Question 7

Topic relevance

Why this question appears here

99% 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 9691_s13_qp_23.pdf

Keep practising this topic