Question 6(b) 2016 · May-June · Paper 21 · 6 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 6
Part (b)
Part (b)
Write the pseudocode equivalent of the structured English. Use the identifiers from the table
in part (a). ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[6]
Question 6
Question 3 begins on page 7.
Question 7
Question 3
In this method, a new character substitutes for each character in the original string. This will create the encrypted string. The substitution uses the 7-bit ASCII value for each character. This value is used as an index for a 1D array, Lookup, which contains the substitute characters. Lookup contains an entry for each of the ASCII characters. It may be assumed that the original string and the substitute characters are all printable. For example: • ‘A’ has ASCII value 65 • Array element with index 65 contains the character ‘Y’ (the substitute character) • Therefore, ‘Y’ substitutes for ‘A’ • There is a different substitute character for every ASCII value The programmer writes a function, EncryptString, to return the encrypted string. This function will receive two parameters, the original, PlainText string and the 1D array.
Why this question appears here
71% assigned-topic match · Data types and structures › Arrays
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_s16_qp_21.pdf
