Professional Documents
Culture Documents
0 0 0 0 0 0 0 0
the right and using ink or pencil, shade the corresponding 1 1 1 1 1 1 1 1
circle completely in the grid for each digit or letter. DO 2 2 2 2 2 2 2 2
NOT WRITE YOUR NAME! 3 3 3 3 3 3 3 3
4 4 4 4 4 4 4 4
2. [SAMPLE] This SAMPLE examination booklet con- 5 5 5 5 5 5 5 5
2. [SAMPLE] Given the following sequence, how many b characters will there be in the
next item?
1. abc
2. abbccc
3. abbbbbccccccccccccccc
5 10 13 20 210
Page 2
3. [SAMPLE] A 100kg watermelon consists of 99% water. After being left out in the sun
for some time, it now consists of 98% water. How much water evaporated?
x = 2
for i in range(1, 3):
x = x + i
Suppose x and i are variables (that you can assign values to), and that the end result of
variable x is 5. What do you think the MAIN purpose of this for-loop is?
Page 3
5. [SAMPLE] The program below shows an example of a function call.
def f(x):
return x + 1
y = f(10)
def g(x):
return x + 5
def h(x):
return g(x) * 2
z = h(10)
10 20 25 30 40
Page 4