Question 11(c) 2013 · October-November · Paper 22 · 26 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 11
Part (c)
Question 11
ENDIF
Question 9
Part (b)
(i)
Complete the trace table using "Aisha" as input. For
Examiner's Password Attempt Password = "Aisha" Use Attempt Password Output = "Aisha" > 3 OR Attempt > 3 0
Aisha
(ii)
Complete the trace table using the following sequence of inputs:
"aisha", "Asha", "AISHA"
Password Attempt Password = "Aisha" Attempt Password Output = "Aisha" > 3 OR Attempt > 3 0
Question 10
Part (c)
This piece of code does not do what Aisha intended. There is an error. For
Examiner's Use
(i)
State the type of error.
(ii)
There are several ways to correct this. One is to change line 5.
Rewrite line 5.
Part (d)
State why someone’s name is not a good password.
Part (e)
Describe how to choose a more secure password.
Question 11
Question 3 continues on page 12.
Question 12
Part (f)
Having entered a correct password, Aisha wants to present a menu screen. For
The user is to enter a number between 1 and 4 to make a choice. Examiner's Use
- Option 1 - email
- Option 2 - social network
- Option 3 - schoolwork
- Option 4 - favourite websites
The number entered is to be stored in a variable, Choice. Each option calls an appropriate procedure.
(i)
Write program code which
- inputs the user’s choice,
- validates this choice,
- uses nested IF statements to call the appropriate procedure.
Programming language
Code
Question 13
(ii)
Rewrite your IF statements using a CASE/SELECT statement to implement the For
menu options. Examiner's Use
Question 14
4 Aisha writes the following pseudocode for a recursive function that works out the greatest For common divisor of two positive integers: Examiner's Use 0 FUNCTION Divisor(x, y) 1 IF y = 0 2 THEN 3 RETURN x 4 ELSE 5 x ← x MOD y 6 RETURN Divisor(y, x) 7 ENDIF 8 ENDFUNCTION
Part (c)
What happens if x is less than y?
Question 16
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.
University of Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
Why this question appears here
98% assigned-topic match · Computational thinking and problem-solving › Recursion
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_w13_qp_22.pdf
