Question 1 2015 · October-November · Paper 22 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 1
(i)
2
(ii)
7.5
(iii)
FALSE
(iv)
TRUE
(v)
ERROR
Show text version of question
Question 1
Computer programs have to evaluate expressions.
Study the sequence of pseudocode statements.
Give the value assigned to each variable.
The statement may generate an error. If so, write ERROR.
The & operator is used to concatenate strings.
DECLARE N1 : INTEGER DECLARE N2 : INTEGER DECLARE Answer : REAL DECLARE Found : BOOLEAN DECLARE IsValid : BOOLEAN N1 ← 3 N2 ← 9 Answer ← (N1 + N2) / 6 Answer ← 3 * (N1 – 2) + N2 / 2 IsValid ← (N1 > N2) AND (N2 = 9) Found ← FALSE
IsValid ← (N1 > N2 / 2) OR (Found = FALSE) Answer ← "1034" & " + " & "65"
(i)
Answer ..............................................................................................................................
(ii)
Answer ..............................................................................................................................
(iii)
IsValid ...........................................................................................................................
(iv)
IsValid ...........................................................................................................................
(v)
Answer ..............................................................................................................................
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.
Question 3
Why this question appears here
82% assigned-topic match · Data types and structures › Data types and records
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_w15_qp_22.pdf
