Professional Documents
Culture Documents
HKICO quốc tế 2019 2020
HKICO quốc tế 2019 2020
HKICO quốc tế 2019 2020
COMPUTATIONAL OLYMPIAD
FINAL ROUND 2019 - 2020
Python
Time allowed: 90 minutes
Mock Paper
Instructions to Contestants:
1. Each contestant should have ONE Question-Answer Book which CANNOT be taken away.
2. There are a total of 24 questions in this Question-Answer Book. Two points for correct answers. No points
for incorrect answers. ONE penalty point will be deducted for incorrect answers.
3. All answers should be written on ANSWER SHEET.
4. During the contest, NO calculators can be used for PRIMARY GROUP but calculators can be used for
SECONDARY GROUP.
5. All figures in the paper are not necessarily drawn to scale.
6. This Question-Answer Book will be collected at the end of the contest.
A. 1
B. 10
C. 11
D. 30
E. None of the above
A. [12345]
B. [ a; b; c; d; e ]
C. [ *range(10) ]
D. [ True True False False True ]
E. None of the above
A. clock_gettime
B. ctime
C. gmtime
D. utctime
E. None of the above
A. 13.2
B. 16
C. 120
D. 12
E. None of the above
A. 0.001 second
B. 0.01 second
C. 0.1 second
D. 1.0 second
E. None of the above
A. True
B. False
C. None
D. Runtime Error
E. None of the above
A. 30
B. 40
C. 50
D. 60
E. None of the above
class A:
x = 3
def func(a):
print(a.x)
a = A()
a.x = 2
A.func = func
a.func()
A. 2
B. 3
C. runtime error
D. None
E. None of the above
10. What is the output of the following code?
sum = 0
for a, index in enumerate([4, 3, 2, 1]):
sum += a
print(sum)
A. 6
B. 10
C. 16
D. 4
E. None of the above
A. 1
B. 17
C. 33
D. 65
E. None of the above
A. 0
B. 1
C. 2
D. 3
E. None of the above
A. 24
B. 12
C. 6
D. 1
E. None of the above
14. Which of the following is a valid list?
A. list(1,3,2,5)
B. ([(3, ), (4, ), ],)
C. [*range(5)]
D. list(*(4,2,3,))
E. None of the above
A. condition ? a : b
B. [] ? a : b
C. if []: a else b
D. a if condition else b
E. [a, b][condition]
A. 1
B. 3
C. 9
D. 27
E. None of the above
a = lambda b: b * 2
b = lambda c: a(c)
c = 3
print(a(b(c)))
A. 2
B. 6
C. 12
D. 8
E. None of the above
A. virtual_env
B. virtualenv
C. virevn
D. venv
E. None of the above
19. Which of the following programs is used to install packages?
A. package-install
B. pacman
C. yum
D. pip
E. None of the above
A. float
B. length
C. string
D. cast
E. None of the above
A. bytearray
B. hex
C. Uint8Array
D. Exception
E. None of the above
A. 1e240
B. 123456
C. 1234
D. 3456
E. None of the above
A. 4
B. 1
C. 0
D. 5
E. 3
~ End of Paper ~