Blockly đề 9
Blockly đề 9
Đề thi Vòng chung kết quốc gia năm học 2019 – 2020
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
61
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0961 603 003 / 0917 830 455
6. Notice the gap as indicated in the image below. What does the gap suggest?
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.
62
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0961 603 003 / 0917 830 455
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
63
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0961 603 003 / 0917 830 455
11. The following code is generated by the block. Would the values of the list ALWAYS be
the same? Why?
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 be 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:
64
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0961 603 003 / 0917 830 455
13. What is the printed output?
A. 0
B. 1
C. 3
D. A
E. d
14. Would removing the text block “dsf” change the output? Why?
A. Yes, the output would change because input ‘text’ is changed
B. Yes, the output would change to nothing because the code no longer works
C. No, the output would not change because ‘dsf’ do not have length
D. No, the output would not change because set text to only looks for string
E. None of the above
15. Refer to the following block and the respective code. The code doesn’t output anything,
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
65
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0961 603 003 / 0917 830 455
17. What should be input when prompted in order to get the output of “you are good at
math!”? Why?
A. Nothing because you are already good at math
B. x because x stands for variable that could be any value, the value must fit the answer
C. 0 because it is the solution
D. 2 because it would make the comparison statement become true
E. None of the above
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.
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
67
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0961 603 003 / 0917 830 455