Question 4(a) 2017 · May-June · Paper 22 · 17 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (a)
Show text version of question
Question 4
Part (a)
Question 4
WRITEFILE (MyFile, "Data is " & String2)
Part (b)
(i)
Complete the following two sentences.
(ii)
The following table shows the values of three variables.
Variable Value FlagA TRUE FlagB FALSE FlagC TRUE
Evaluate these expressions.
Expression Evaluates to
(FlagA AND FlagB) OR FlagC
FlagA AND (FlagB OR FlagC)
(NOT FlagA) OR (NOT FlagC)
Question 3
Part (c)
The loop construct (also known as repetition or iteration) appears in many algorithms.
Use pseudocode to write a post-condition loop to output all the odd numbers between 100 and 200.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
..............................................................................................................................................
Question 4
2 A multi-user computer system maintains a text file containing the ID and preferred name for each user. User IDs are unique. Preferred names may be repeated.
Part (a)
Stepwise refinement is to be applied to the following three steps.
After a user logs in, a welcome message is produced as follows:
1. Search for the user ID in the file. 2. Read the preferred name from the file. 3. Output the welcome message.
Describe the goal of stepwise refinement.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
..............................................................................................................................................
Why this question appears here
75% 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_s17_qp_22.pdf
