Past-paper question · 2018 May-June · Paper 23 · Q4

Question 4 2018 · May-June · Paper 23 · 10 marks

Original past-paper question for 4
Original past-paper question for 4
Original past-paper question for 4
Reveal official mark-scheme answer Official mark-scheme answer for 4

Official answer for Question 4

Question 9

✓
This is on
✓
ne possible solution – s selection st tructure ma y differ
✓
One mar rk for:

Question 1

✓
STAR
✓
RT and END
✓
D // STOP
✓
P

Question 2

✓
Initia
✓
alisation of an
✓
a Index v variable and
✓
d initialisatio
✓
on of a Coun
✓
nt variable
✓
e

Question 3

✓
Deci ision box / boxes
✓
b
✓
to che
✓
eck temper rature within
✓
n acceptable e range

Question 4

✓
Corr rect increme
✓
ent of Coun t variable

Question 5

✓
Deci ision box co
✓
omparing In
✓
ndex to 100

Question 6

✓
Corr rect increme
✓
ent of Inde x

Question 7

✓
Deci ision box co
✓
omparing Co
✓
ount > 20

Question 8

✓
Assig
✓
gning both TRUE and F
✓
FALSE

Question 9

✓
Retu
✓
urning the Boolean
✓
B
✓
valu
✓
ue
✓
For solut tions where Boolean va
✓
ariable not used:
✓
u

Question 8

✓
Retu
✓
urn TRUE

Question 9

✓
R
✓
Return
✓
FALS
✓
SE
✓
9608/23
✓
Cambridge International AS/A Level – Mark Scheme
✓
May/June 2018
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s18_ms_23.pdf →

Show text version of question

Question 4

A
program controls a chemical process in a factory.

The temperature is monitored as part of the control process. The temperature is measured at fixed time intervals and the value is stored in an array, PTemp. The array contains 100 elements, representing 100 temperature values. The first element is PTemp[1].

The program will check whether the temperature is outside the acceptable range more than 20 times. This task is performed by a function, IsTempOK().

The algorithm for the function IsTempOK() is expressed in structured English as follows:

1 Examine each array element and count the number of times that a temperature is less than MinTemp or more than MaxTemp. 2 If the count in step 1 exceeds 20, return FALSE, otherwise return TRUE.

Draw a program flowchart, on the next page, to represent the algorithm for the function IsTempOK().

Assume:

  • the array contains 100 valid temperature values
  • PTemp, MinTemp and MaxTemp are global variables.

Note that variable declarations are not required in program flowcharts.

Question 9

[9]

Question 10

Topic relevance

Why this question appears here

82% 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_s18_qp_23.pdf

Keep practising this topic