Question 5(b) 2019 · May-June · Paper 21 · 8 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (b)
Question 8
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Question 8
Show text version of question
Question 5
Part (b)
Part (b)
A student is learning about random number generation.
She is investigating how many times the random function needs to be called before every number in a given series is generated.
She is using pseudocode to develop a procedure, TestRand(), which will:
- use the random number function to generate an integer value in the range 1 to 50
- count how many times the random function needs to be called before all 50 values have
- output a message giving the number of times the random function was called.
inclusive
been generated
Question 13
Write pseudocode for the procedure TestRand().
For the built-in functions list, refer to the Appendix on page 16.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 14
Why this question appears here
71% assigned-topic match · Programming › Structured programming
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_s19_qp_21.pdf
