Question 5(a) 2017 · October-November · Paper 21 · 8 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (a)
Question 8
Show text version of question
Question 5
Part (a)
Question 5
A sports club maintains a record of the email address of each of its members. The details are
stored in a text file, EmailDetails.txt. The format of each line of the text file is as follows:
<MembershipNumber><EmailAddress>
- MembershipNumber is a four-character string of numerals.
- EmailAddress is a variable-length string.
Membership of the club has increased and a four-character membership number is no longer adequate.
1. Create a new file, NewEmailDetails.txt 2. Read a line from file EmailDetails.txt 3. Extend MembershipNumber by adding two leading zero digits (for example, "1234" becomes "001234") 4. Write the new line to file NewEmailDetails.txt 5. Repeat steps 2 to 4 for all lines in the original file.
Part (a)
Write pseudocode for the procedure MakeNewFile.
For the built-in functions list, refer to the Appendix on page 14.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[8]
Question 13
Why this question appears here
72% assigned-topic match · Hardware › Logic gates and logic circuits
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_w17_qp_21.pdf
