Question 5(b)(ii) 2021 · May-June · Paper 22 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (b)
(ii)
Question 6
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Show text version of question
Question 5
Part (b)
(ii)
(ii)
The function, Verify(), is to be amended as follows:
- if the UserID is "Guest", a password is not required and TRUE should be returned
- output a message to try again if the password entered is not valid
- return FALSE if the number of attempts to enter a valid password exceeds three.
Write program code for the amended function Verify().
Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type.
Programming language ......................................................................................................
Program code
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
Question 12
Why this question appears here
72% assigned-topic match · Data types and structures › Data types and records
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_s21_qp_22.pdf
