HKICO 2019-2020 - Heat - Blockly
HKICO 2019-2020 - Heat - Blockly
HKICO 2019-2020 - Heat - Blockly
COMPUTATIONAL OLYMPIAD
HEAT ROUND 2019 - 2020 (HONG KONG REGION)
Blockly
Time allowed: 60 minutes
Question Paper
Instructions to Contestants:
1. Each contestant should have ONE Question-Answer Book which CANNOT be taken away.
2. There are a total of 20 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. Programming
B. Making games
C. Machine learning
D. Wash dishes
E. None of the above
A. Math
B. Logic
C. Loops
D. Variables
E. None of the above
A. A mobile phone
B. A television
C. A fridge
D. A sofa
E. None of the above
A. MIT
B. Space X
C. Google
D. Github
E. None of the above
5. Refer to the following code:
What is the value of „number‟ after executing this code? (What is the number printed?)
A. 0
B. 1
C. 2
D. 3
E. 4
A. No meaning
B. More blocks can be filled in place
C. The reddish color block does not fit in the green block
D. Some block is missing and must be filled in
E. None of the above
Which of the following codes/blocks gives the most similar effect as above?
A.
B.
C.
D.
E. None of the above
8. What is the difference between the two blocks?
A. No difference
B. One would print another would not print
C. One would print twice another would only print once
D. Both code do nothing because 2 never equals to 1 nor 3
E. None of the above
A. True
B. False, because 1 is not an even number
C. False, because 1+1 is not an even number
D. False, because there is no “if” block
E. None of the above
A. Yes, there is a chance the values in the list repeat even they are random integer from 1 to 5
B. Yes, only one random integer is used in the list
C. No, the values are random integer from 1 to 5
D. No, the list must the the combination of 1,2,3,4,5
E. None of the above
Refer to the following block and the respective code (Javascript) for question 12 to 14:
12. Why “letter #” shown in the block is 1 but it is 0 in the code?
A. 0
B. 1
C. 3
D. A
E. d
14. Would removing the text block “dsf” change the output? Why?
A. The code would result in error because negative number does not have remainder
B. 0, because erroneous code would give default value „0‟
C. 3 because remainder of 23 ÷ 10 is 3
D. -3 because remainder of -23 ÷ 10 is -3
E. None of the above
17. What should be input when prompted in order to get the output of “you are good at math!”? Why?
18. Which of the following is the correct modification so that user will keep being prompted when the input is
not the desired one?
A.
B.
C.
D.
E. None of the above
19. Does the following code achieve the same result as in question 17? If not, Why?
A. 3
B. 9
C. 150
D. 170
E. None of the above
~ End of Paper ~