Past-paper question · 2014 May-June · Paper 22 · Q1(d)

Question 1(d) 2014 · May-June · Paper 22 · 10 marks

Original past-paper question for 1(D)
Original past-paper question for 1(D)
Original past-paper question for 1(D)
Original past-paper question for 1(D)
Original past-paper question for 1(D)
Original past-paper question for 1(D)
Reveal official mark-scheme answer Official mark-scheme answer for 1(D)Official mark-scheme answer for 1(D)

Official answer for Question 1

Part (d)

Part (d)

1 mark for each correctly labelled shape (accept full text instead of number)

✓
FUNCTION CheckAnswerCorrect(Number1, Number2)
✓
R ← Number1 * Number 2
✓
INPUT
✓
AnswerString
✓
No
✓
Yes
✓
Convert AnswerString to
✓
AnswerNumber
✓
No
✓
No
✓
Yes
✓
Yes
✓
Return TRUE
✓
ENDFUNCTION
[10]
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
GCE AS/A LEVEL – May/June 2014
✓
9691

Question 22

✓
(2) (a) FUNCTION TestScoreTotal RETURNS INTEGER
✓
// 1 mark
✓
DECLARE AnswerCorrect, Finish : BOOLEAN
✓
// 1 mark
✓
DECLARE Number1, Number2, Score : INTEGER
✓
// 1 mark
✓
Score 0
✓
// 1 mark
✓
Finish FALSE
✓
REPEAT
✓
Number1 Random(10)
✓
// accept X instead of 10
✓
Number2 Random(10)
✓
// 1 mark
✓
Display(Number1, Number2)
✓
AnswerCorrect CheckAnswerCorrect(Number1, Number2)
✓
IF AnswerCorrect = TRUE
✓
// 1 mark
✓
THEN Score Score + 1
✓
ELSE Finish TRUE
✓
// 1 mark
✓
ENDIF
✓
// accept =
✓
instead of
✓
UNTIL Finish = TRUE
✓
// 1 mark
✓
RETURN Score
✓
// 1 mark
✓
ENDFUNCTION
[9]
✓
•
✓
If candidate only says “Visual Basic” (no version number) use the mark scheme that best
✓
fits the answer
✓
•
✓
If language given is “Pseudocode”, give no marks
✓
•
✓
Identifiers must be as given in the question
✓
Mark as follows:

Mark scheme 9691_s14_ms_22.pdf →

Show text version of question

Question 1

Part (d)

Question 1

A teacher wants to write a program to help young children learn their multiplication tables.

Part (d)

The function CheckAnswerCorrect gives the child three chances to type in the correct

answer. The function returns TRUE if the child typed the correct answer, and FALSE if all three attempts are incorrect.

Complete the flowchart opposite, using the given statements. Label each blank symbol with the correct statement number.

Question 5

FUNCTION CheckAnswerCorrect(Number1, Number2)

1 Output “Incorrect. Try again.” R Number1 * Number2 2 Output “Correct. Well done!” 3 Output “You need to practice more. The correct answer is ” R 4 Output “Type your answer.” 5 Return FALSE 6 Is NumberOfTries > 2 ? 7 Is AnswerNumber = R ? 8 Is AnswerString digits only ? 9 NumberOfTries 0 INPUT 10 NumberOfTries NumberOfTries + 1 AnswerString

No

Yes

Convert AnswerString to AnswerNumber

No

No

Yes Yes

Return TRUE

ENDFUNCTION

[10]

Question 6

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Programming basics

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

Keep practising this topic