Question 2(a) 2024 · October-November · Paper 22 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (a)
Question 6
Show text version of question
Question 2
Part (a)
Question 2
A program is being developed to process bank card information.
When a card number is displayed, all the characters except the last four are replaced with the asterisk character '*'.
Card numbers are stored as strings. The strings are between 10 and 20 characters in length.
The function Conceal() will take a string representing a card number and return a modified string.
Example strings:
Original string Modified string
Part (a)
The function Conceal() will:
- take a numeric string as a parameter representing the card number
- return a string in which the asterisk character replaces all except the last four characters
of the card number parameter.
Write pseudocode for the function Conceal().
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 5
, ,
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 9618_w24_qp_22.pdf
