Cyber security and ethics – IGCSE Computer Science (0478)

2 questions · Clear filters

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
1
0478/23/O/N/23 · Question 5Oct/Nov 2023Paper 239 marks
Loading question…
Question text

5
An algorithm has been written in pseudocode to check if a new password is in a list of previously
used passwords OldList[]
If the password is not found, the new password will be stored at the end of the list to replace
"XXXX" already stored there.
01
OUTPUT "Enter your new password "
02
INPUT NewPassword
1
03
Posn
FALSE
04
Found
05
REPEAT
06
IF Password = OldList[Posn]
07
THEN
TRUE
08
Found
Posn + 1
09
ELSE Posn
10
ENDIF
11
UNTIL Found AND OldList[Posn] = "XXXX"
12
IF Found
13
THEN
14
OUTPUT "Password has been used before"
15
ELSE
16
INPUT "New password accepted"
NewPassword
17
OldList[Posn]
18
ENDIF
(a) Identify the three errors in the pseudocode and suggest corrections.
Error 1 …
Correction …
…
Error 2 …
Correction …
…
Error 3 …
Correction …
…
[3]
(b) Complete this flowchart for the corrected algorithm:
START
STOP
[6]

2
0478/22/M/J/18 · Question 4May/June 2018Paper 226 marks
Loading question…
Question text

4
A programmer has written a routine to store the name, email address and password of a contributor
to a website’s discussion group.
(a) The programmer has chosen to verify the name, email address and password.
Explain why verification was chosen and describe how the programmer would verify this data.
…
…
…
…
…
…
…
…
… [4]
(b) The programmer has also decided to validate the email address and the password.
Describe validation checks that could be used.
Email address …
…
…
Password …
…
…
[2]

Advertisement