0% found this document useful (0 votes)
82 views7 pages

Blockly đề 9

The document contains a quiz about Blockly programming with 20 multiple choice questions. Blockly is a visual programming tool that allows users to program using drag and drop blocks instead of text-based coding. The questions cover topics like what Blockly can and cannot do, its block categories, how it works, and JavaScript code generated from Blockly blocks.

Uploaded by

vantuongvy100204
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views7 pages

Blockly đề 9

The document contains a quiz about Blockly programming with 20 multiple choice questions. Blockly is a visual programming tool that allows users to program using drag and drop blocks instead of text-based coding. The questions cover topics like what Blockly can and cannot do, its block categories, how it works, and JavaScript code generated from Blockly blocks.

Uploaded by

vantuongvy100204
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ĐỀ SỐ 9

Đề thi Vòng chung kết quốc gia năm học 2019 – 2020

1. Which of the following is which Blockly cannot do?


A. Programming
B. Making games
C. Machine learning
D. Wash dishes
E. None of the above

2. Which of the following block categories does not exist in Blockly?


A. Math
B. Logic
C. Loops
D. Variables
E. None of the above

3. Where can you do programming with Blockly on?


A. A mobile phone
B. A television
C. A fridge
D. A sofa
E. None of the above

4. What is Blockly maintained by?


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
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

7. Following is the code (Javascript) generated by the block

Which of the following codes/blocks gives the most similar effect as above?
A.

B.

C.

D.

E. None of the above

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

9. What would the following block evaluates to? If false, why?

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

10. What is the value of the following block?

A. No value, because ‘123’ do not have upper case


B. 123, because ‘123’ to upper case is still ‘123’
C. 3, because length of ‘123’ is 3
D. 123, because value of ‘123’ is 123
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:

12. Why “letter #” shown in the block is 1 but it is 0 in the code?


A. Blockly made a mistake
B. In Javascript/code, 1 is equal to 0
C. In Javascript/code, string index starts with 0
D. In the block, there is a hidden 0 behind the 1
E. None of the above

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. Actually ‘0’ is printed but it’s 0 so we cannot see


B. There is an error because number does not have function ‘charAt’
C. “Hello World” is too long
D. Variable “text” is spelled wrong and the code cannot interpret variable with wrong
names
E. None of the above

16. What is the output of the following code? 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

Refer to the following code for question 17 to 19:

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.

E. None of the above

19. Does the following code achieve the same result as in question 17? If not, Why?

A. Yes, the two code behaves the same


B. No, nothing is printed in else condition
C. No, functions should not be used, also the empty function would break the code
D. No, the two functions would not work because they are defined differently and used
differently
E. None of the above
66
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
20. What is the expected output of the following code?

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

You might also like