Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Đề 1 - Blockly

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

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

a)

Lists

b)

Loops

c)

Games

d)

Color

e)

None of the above

2.

What is Blockly maintained by?

a)

Your school

b)

Youtube

c)

Netflix

d)

Google

e)

None of the above

3.

Refer to the following code for question 3 to 5. What is the expected output?

a)

0

b)

2

c)

5

d)

10

e)

None of the above

4.

What does the gap shown in the red circle below suggest?

a)

More blocks can be filled in place

b)

Blocky has an error

c)

The two blocks don't match

d)

Meaningless

e)

None of the above

5.

What is 'Count'?

a)

Counting how many times the green loop repeats

b)

A variable

c)

0, it is always 0

d)

Counting how many blocks in the code

e)

None of the above

6.

a)

Yes, they are the same

b)

No, this list has only one element

c)

No, this list contains more text blocks

d)

No, this list does not have print

e)

None of the above

7.

What is the message in 'window.alert'? (It is equivalent to the content of print)

a)

Hey

b)

2

c)

3

d)

19

e)

None of the above

8.

Which of the following code can print all of the values of the list in a single line?

a)

b)

c)

d)

e)

None of the above

9.

Continuing on question 8, what is the line of output if the following block is added before printing?

a)

A. Hey Are you having fun with Blocky? YES!

b)

B. Hey Are you having fun YES!

c)

C. Hey Are you having fun with Blocky? YES!

d)

D. Hey Are you having fun with Blocky? 3 YES

e)

E. None of the above

10.

What is the value of the block?

a)

Hey

b)

0

c)

4

d)

Are you having fun

e)

None of the above

11.

What would be printed? Why?

a)

false, because nothing would equal to a random integer

b)

false, because random integer from 3 to 3 would cause error

c)

true, because length of abc is 3

d)

true, because length of string equals to a number in every condition

e)

None of the above

12.

Refer to the following code, the first line of output is 2. What is the second line of output? Why?

a)

A. Because random integer would not repeat

b)

B. Undetermined because random integer cannot be predicted (easily)

c)

C. 2 because i is 2

d)

D. 2 because this is the second time the loop repeats

e)

E. None of the above

13.

Is the value of the following two blocks equivalent? Why?

a)

Yes, they are both 3

b)

Yes, they have the same content

c)

No, length of a list would never equal to length of a text

d)

No, length of list is 3 but length of text does not equal to 3

e)

None of the above

14.

The following code is executed but there is no output, why?

a)

A. Picking random integer from a negative range causes error in Blocky

b)

B. The content for printing is not defined

c)

C. Repeat 1 time is never happening because "random integer from -3 to 1" is exclusive

d)

D. Value smaller than 1 is picked

e)

E. None of the above

15.

What would be printed with the following code executed?

a)

empty list

b)

not empty list

c)

Undetermined because value of list is unknown

d)

Nothing would be printed

e)

None of the above

16.

a)

Yes, if the block can check list’s emptiness directly

b)

Yes, list is empty anyway

c)

The code produces error because list cannot contain random color

d)

No, because print "a list" does not print the variable "list"

e)

None of the above

17.

What is the output of the following code block?

a)

No output because color cannot be printed

b)

100 50 0

c)

#100500

d)

#ff7000

e)

None of the above

18.

What is expected output of the following block? (Assume the underlying language is Java script)

a)

No output because the list contains elements of different types

b)

No output because the list contains expressions

c)

1, 2, 3

d)

item 1, 2, 3

e)

None of the above

19.

Which of the following is a correct description of the code below?

a)

User would be prompted with “Hi, how are you?”, if the user replied with “I am fine”, “That’s great” would be printed.

b)

User would be prompted with “That’s great”, if the user continues to ask “Hi, how are you?”, “I am fine” would be printed.

c)

This code produces error because invalid code blocks are used, and the function name cannot contain non-alphabetical symbols too.

d)

User would be prompted with “Hi, how are you?” and nothing more because ‘=’ cannot be used with string but only with numbers.

e)

None of the above

20.

What is the output of the following code?

a)

A. 13

b)

B. 18

c)

C. 21

d)

D. 153

e)

E. None of the above