WorksheetsĐề 1 - Blockly
Total questions: 20
Worksheet time: 10mins
Which of the following block categories does not exist in Blockly?
Lists
Loops
Games
Color
None of the above
What is Blockly maintained by?
Your school
Youtube
Netflix
None of the above
Refer to the following code for question 3 to 5. What is the expected output?
0
2
5
10
None of the above
What does the gap shown in the red circle below suggest?
More blocks can be filled in place
Blocky has an error
The two blocks don't match
Meaningless
None of the above
What is 'Count'?
Counting how many times the green loop repeats
A variable
0, it is always 0
Counting how many blocks in the code
None of the above
Yes, they are the same
No, this list has only one element
No, this list contains more text blocks
No, this list does not have print
None of the above
What is the message in 'window.alert'? (It is equivalent to the content of print)
Hey
2
3
19
None of the above
Which of the following code can print all of the values of the list in a single line?
None of the above
Continuing on question 8, what is the line of output if the following block is added before printing?
A. Hey Are you having fun with Blocky? YES!
B. Hey Are you having fun YES!
C. Hey Are you having fun with Blocky? YES!
D. Hey Are you having fun with Blocky? 3 YES
E. None of the above
What is the value of the block?
Hey
0
4
Are you having fun
None of the above
What would be printed? Why?
false, because nothing would equal to a random integer
false, because random integer from 3 to 3 would cause error
true, because length of abc is 3
true, because length of string equals to a number in every condition
None of the above
Refer to the following code, the first line of output is 2. What is the second line of output? Why?
A. Because random integer would not repeat
B. Undetermined because random integer cannot be predicted (easily)
C. 2 because i is 2
D. 2 because this is the second time the loop repeats
E. None of the above
Is the value of the following two blocks equivalent? Why?
Yes, they are both 3
Yes, they have the same content
No, length of a list would never equal to length of a text
No, length of list is 3 but length of text does not equal to 3
None of the above
The following code is executed but there is no output, why?
A. Picking random integer from a negative range causes error in Blocky
B. The content for printing is not defined
C. Repeat 1 time is never happening because "random integer from -3 to 1" is exclusive
D. Value smaller than 1 is picked
E. None of the above
What would be printed with the following code executed?
empty list
not empty list
Undetermined because value of list is unknown
Nothing would be printed
None of the above
Yes, if the block can check list’s emptiness directly
Yes, list is empty anyway
The code produces error because list cannot contain random color
No, because print "a list" does not print the variable "list"
None of the above
What is the output of the following code block?
No output because color cannot be printed
100 50 0
#100500
#ff7000
None of the above
What is expected output of the following block? (Assume the underlying language is Java script)
No output because the list contains elements of different types
No output because the list contains expressions
1, 2, 3
item 1, 2, 3
None of the above
Which of the following is a correct description of the code below?
User would be prompted with “Hi, how are you?”, if the user replied with “I am fine”, “That’s great” would be printed.
User would be prompted with “That’s great”, if the user continues to ask “Hi, how are you?”, “I am fine” would be printed.
This code produces error because invalid code blocks are used, and the function name cannot contain non-alphabetical symbols too.
User would be prompted with “Hi, how are you?” and nothing more because ‘=’ cannot be used with string but only with numbers.
None of the above
What is the output of the following code?
A. 13
B. 18
C. 21
D. 153
E. None of the above
