Documente Academic
Documente Profesional
Documente Cultură
sum1 = 0
sum2 = 0
total = 0
INPUT a, b, c, d, e, f
Yes
is a = 0 and
b = 0?
STOP
No
sum1 = a*6 + b*5 + c*4
total = total 11
is total = 0?
Yes
No
No
is total < 0?
Yes
OUTPUT error
8
9
For
Examiner's
Use
START
C=1
H=0
T1 = 0
T2 = 0
T3 = 0
INPUT number
Yes
T3 = T3 + 1
No
Yes
T2 = T2 + 1
is number > 99 ?
No
T1 = T1 + 1
Yes
H = number
is number > H ?
No
C=C+1
Yes
is C <= 10 ?
No
OUTPUT T1,
T2, T3, H
STOP
UCLES 2012
7010/13/O/N/12
9
Complete the trace table for the following data:
For
Examiner's
Use
T1
T2
T3
number
OUTPUT
[6]
UCLES 2012
7010/13/O/N/12
[Turn over
10
8
START
INPUT number
product = 1
value = number
value = value 1
No
is value = 0?
Yes
STOP
UCLES 2014
7010/11/M/J/14
11
Complete the trace table for the input value of 5:
number
product
value
OUTPUT
[4]
UCLES 2014
7010/11/M/J/14
[Turn over
8
8
Data sent across the Internet are frequently encrypted. The following flowchart shows a basic
encryption method (Note: the
symbol in the flowchart means is replaced by).
START
INPUT
character
is character =
. ?
Yes
STOP
No
is character a
vowel ?
Yes
a
e
i
o
u
o
u
a
e
i
b
c
d
f
g
h
j
s
t
v
w
x
y
z
k
l
m
n
p
q
r
b
c
d
f
g
h
j
s
t
v
w
x
y
z
k
l
m
n
p
q
r
No
is character =
b,c,d,f,g,h or j ?
Yes
No
is character =
k,l,m,n,p,q or r ?
Yes
No
No
UCLES 2014
is character =
s,t,v,w,x,y or z ?
Yes
7010/13/O/N/14
9
For example,
l o
a m
r o b o t
y u c c e
o d
j e s e l
h e l
becomes:
m e e t
i n g
w i
g o
a h e a d .
[2]
(b) Use the information in the flowchart to show which input message produced the following
encrypted message:
t e d g i
l a f x
a k
w i
[2]
(c) Many customers shop online.
Apart from encryption, describe three other security features built into many online shopping
websites.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...............................................................................................................................................[3]
UCLES 2014
7010/13/O/N/14
[Turn over
16
13 Study the following flowchart very carefully.
START
T1 = 0
T2 = 0
T3 = 0
INPUT A, B, C
is A = 0
and B = 0 and
C=0?
Yes
OUTPUT T1,
T2, T3
STOP
No
is A > B ?
Yes
No
is B > C ?
is A > C ?
No
No
T3 = T3 + 1
Yes
T2 = T2 + 1
UCLES 2014
7010/13/O/N/14
Yes
T1 = T1 + 1
17
(a) Complete the trace table for the flowchart using the following data:
3, 2, 1
T1
4, 8, 7
T2
6, 0, 3
T3
5, 6, 9
A
4, 11, 3
B
0, 0, 0
OUTPUT
[5]
(b) This flowchart does not give correct answers for certain sets of test data.
Suggest a data set that would give an incorrect answer.
Give a reason for your choice.
data set .....................................................................................................................................
...................................................................................................................................................
reason .......................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
UCLES 2014
7010/13/O/N/14
[Turn over
8
3
The flowchart below inputs the weight of a number of parcels in kilograms. Parcels weighing more
than 25 kilograms are rejected. A value of 1 stops the input.
The following information is output: the total weight of the parcels accepted and number of parcels
rejected.
START
!"#$%&%'
()*)+"%&%'
INPUT
Weight
Is Weight
= 1?
Yes
OUTPUT Total,
Reject
END
No
Is Weight
> 25?
Yes
()*)+"%&%()*)+"%,%1
No
!"#$%&% !"#$%,%-)./0"
UCLES 2015
2210/21/M/J/15
9
Complete the trace table for the input data:
1.8, 26.0, 7.0, 11.3, 10.0, 2.5, 25.2, 5.0, 19.8, 29.3, 1
Total
Reject
Weight
OUTPUT
[5]
Five data types and five data samples are shown below.
Draw a line to link each data type to the correct data sample.
Data type
Data sample
Integer
'a'
Real
Char
2.0
String
True
Boolean
"Twelve"
[4]
UCLES 2015
2210/21/M/J/15
[Turn over
6
3
(a) The flowchart below inputs six single digit numbers. The predefined function MOD gives the
value of the remainder, for example, Y
10 MOD 3 gives the value Y = 1
START
INPUT
A, B, C, D, E, F
Total
Check
Total MOD 11
Is Check = Yes
F?
No
OUTPUT
'Reject'
END
UCLES 2015
2210/22/M/J/15
OUTPUT
'Accept'
7
Complete a trace table for each of the two sets of input data.
Set 1
5, 2, 4, 3, 1, 5
Set 2
3, 2, 1, 0, 7, 3
Total
Check
Output
Total
Check
Output
[4]
(c) Identify a problem with this flowchart and explain how to correct it.
Problem ....................................................................................................................................
...................................................................................................................................................
Solution .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
UCLES 2015
2210/22/M/J/15
[Turn over