Sunteți pe pagina 1din 43

START

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

sum2 = d*3 + e*2 + f*1

total = sum1 + sum2

total = total 11

is total = 0?

Yes

OUTPUT data are OK

No
No

is total < 0?

Yes

OUTPUT error

8
9

Study this flowchart very carefully.

For
Examiner's
Use

START

C=1
H=0
T1 = 0
T2 = 0
T3 = 0

INPUT number

Yes
T3 = T3 + 1

is number > 999 ?

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

1500, 1000, 100, 10, 999, 99, 2000, 5, -3, 0


C

T1

T2

T3

number

OUTPUT

[6]

UCLES 2012

7010/13/O/N/12

[Turn over

10
8

Study the following flowchart very carefully.

START

INPUT number

product = 1

value = number

product = value * product

value = value 1

No

is value = 0?
Yes

OUTPUT number, product

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:

(a) Use the flowchart to encrypt the following message:

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

A*1 + B*2 + C*3 + D*4 + E*5

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

Trace table set 1 5, 2, 4, 3, 1, 5


A

Total

Check

Output

Total

Check

Output

Trace table set 2 3, 2, 1, 0, 7, 3


A

[4]

(b) State the purpose of the flowchart in part (a).


...................................................................................................................................................
...............................................................................................................................................[1]

(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

S-ar putea să vă placă și