Past-paper question · 2016 October-November · Paper 22 · Q4(d)(ii)

Question 4(d)(ii) 2016 · October-November · Paper 22 · 3 marks

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

Official answer for Question 4

Part (d)

(ii)

(ii)

•

✓
Use an array / list / file to store each number generated // a flag value
✓
•
✓
Check the array / list / file to see if the new random number has already been drawn
✓
•
✓
If YES, generate another number
✓
•
✓
If NO, output the number and update the array / list / file
✓
[Max. 3]

Question 5

Mark scheme 9608_w16_ms_22.pdf →

Show text version of question

Question 4

Part (d)

(ii)

Question 4

A social club runs a weekly prize draw. A member can buy a ticket for $2. Each week, the club

sells up to 150 tickets, with consecutive numbers starting from 1. There is a main cash prize of $120 and a further three prizes of $10. The computer program will generate the winning numbers.

Throughout this question, you will need to refer to the list of pseudocode functions in the Appendix. The organisers do not want the same number to be drawn more than once in a week. To deal with the issue of duplicate numbers being generated, the program in part

Part (b)

will require

adaptive maintenance.

(ii)

The club does not want the program to output the same number more than once in a

week.

For each winning number, outline the extra steps that the program must have. Include any data structure that the program needs. Do not write pseudocode or program code.

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

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

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

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

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

[3]

Question 12

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 9608_w16_qp_22.pdf

Keep practising this topic