Question 6(b)(i) 2017 · May-June · Paper 23 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
(i)
Question 5
- at least 2 uppercase alphabetic
- at least 2 lowercase alphabetic
- at least 3 numeric characters
- No other character
- With incorrect numbers of:
- Lower case characters
- Upper case characters
- Numeric characters
- Containing an invalid character
Show text version of question
Question 6
Part (b)
(i)
Question 6
A multi-user computer system makes use of passwords.
To be valid, a password must comply with the following rules:
- at least two lower-case alphabetic characters
- at least two upper-case alphabetic characters
- at least three numeric characters
- alpha-numeric characters only
This function takes a string, Pass, as a parameter and returns a Boolean value:
- TRUE if Pass contains a valid password
- FALSE otherwise.
(i)
The function will be tested.
Give a valid string to check that the function returns TRUE under the correct conditions.
String1: ..............................................................................................................................
Modify the valid string given for String1 to test each rule separately.
Explain your choice in each case.
String2: ..............................................................................................................................
Explanation: ......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
String3: ..............................................................................................................................
Explanation: ......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
String4: ..............................................................................................................................
Explanation: ......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
String5: ..............................................................................................................................
Explanation: ......................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Why this question appears here
71% 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 9608_s17_qp_23.pdf
