Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HKICO Test

Total questions: 80

Worksheet time: 48mins

Name
Class
Date
1.
Which of the following block categories exist in Blockly? choose all correct answers
a)
Lists
b)
Loop
c)
Logic
d)
Color
e)
Function
2.
Who should maintain blockly?
a)
Your school
b)
You Tube
c)
MIT
d)
Google
3.
What is the expected output?
a)
100
b)
5
c)
50
d)
40
4.
What is “i”?
a)
variable used to store the integer value of the current position in the range of the for loop.
b)
0, it is always 0
c)
Counting how many blocks in the code
d)
None of the above
5.
What would be printed? Why?
a)
false, because "abc" is text and square root of 9 would be numbers
b)
false, because square root of 9 is not equal to "abc"
c)
true, because length of "abc" is less than square root of (9)
d)
true, because length of "abc" is equal to the square root of (9).
e)
None of the above
6.
What would be printed? Why?
a)
false, because "abc" is text and square root of 9 would be numbers
b)
false, because square root of 9 is not equal to "abc"
c)
true, because length of "abc" is less than square root of (9)
d)
true, because length of "abc" is equal to the square root of (9).
e)
None of the above
7.
What would be printed? Why?
a)
false, because "abc" is text and square root of 9 would be numbers
b)
false, because square root of 9 is not equal to "abc"
c)
true, because length of "Hi" is less than square root of (9)
d)
true, because length of "Hi" is equal to the square root of (9).
e)
None of the above
8.
Refer to the following code,the first line output is 3 and the second line of output is 5. What is the second line of output? Why?
a)
3
b)
5
c)
2
d)
unpredictable
e)
None of the above
9.
Will this block work? If yes what will be the output?
a)
No, loop can't repeat values smaller than 1
b)
Yes, the output is 3
c)
Yes, the output is -3
d)
None of the above
10.
If the pick random value is "-5" will this block work?
a)
Yes
b)
No
11.
What would be the output?
a)
error
b)
10
c)
16
d)
3
e)
None of the above
12.

What would be the output?

(a)  

13.
What is the output of the following code?
a)
21
b)
165
c)
1335
d)
1353
e)
None of the above
14.
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
15.
Refer to the following code: What is the value of ‘number’ after executing this code? (What is the number printed?)
a)
10
b)
11
c)
9
d)
13
e)
8
16.
Which of the following codes/blocks gives the most similar effect as above?
a)
A
b)
B
c)
C
d)
D. None of the above
17.
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 the the combination of 1,2,3,4,5
e)
None of the above
18.
What is the printed output?
a)
6
b)
7
c)
J
d)
Y
19.
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
20.
What should you add the value in the "?" to print out "you are good at maths"
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
21.
What should you add the value in the "?" to print out "you are good at maths"
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
22.
What should you add the value in the "?" to print out "you are good at maths"
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
23.
Which of the following is the correct modification so that user will keep being prompted when the input is not the desired one?
a)
A
b)
B
c)
C
d)
D
24.
Which of the following is the correct modification so that user will keep being prompted when the input is not the desired one?
a)
A
b)
B
c)
C
d)
D
25.
What will be the print value?
a)
10
b)
6
c)
7
d)
22
e)
20
26.
What is the printed output?
a)
6
b)
7
c)
J
d)
Y
27.
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
28.
What is the expected output of the following code?
a)
3
b)
9
c)
16
d)
170
e)
E. None of the above
29.
Does the following code achieve the same result as in above question? 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
30.

What's the following scripts get the same result?

a)

A.

b)

B.

c)

C. Both A and B are correct

d)

D. Both A and B are incorrect

e)

E. None of the above

31.

What's the expected result? (Assume that x = 20)

a)

Nothing happens

b)

Game Over!

c)

Keep Playing!

d)

x = 0

e)

None of the above

32.

Following is a block and the respective code. What is the output?

a)

I love

b)

programming

c)

i love programming

d)

I LOVE PROGRAMMING

e)

None of the above

33.

Following is a block and the respective code. What is the final value of x?

a)

A. 2

b)

B. -4

c)

C. 0

d)

D. -2

e)

E. None of the above

34.

Following is a block and the respective code. What is the output?

a)

A. 7

b)

B. 9

c)

C. 6

d)

D. 4

e)

E. None of the above

35.

What would be printed with the following code executed?

a)

A. x is not empty

b)

B. x is empty

c)

C. Undetermined because value of list is unknown

d)

D. Nothing would be printed

e)

E. None of the above

36.

How many elements in this list?

a)

1

b)

2

c)

666-888

d)

666-888,2000

e)

3

37.

What is the expected result when sorting the list numerically in ascending order?

a)

A. 99, 123, 256, 345, 450

b)

B. 123, 99, 345, 450, 256

c)

C. 256, 450, 345, 123, 99

d)

D. 450, 345, 256, 123, 99

e)

E. None of the above

38.

Refer to the following code, what is the final value of list 'feel'?

a)

['so', 'so', 'happy', 'I'm']

b)

['I'm', 'so', 'so', 'happy']

c)

['I'm', 'so', 'happy']

d)

['I'm', 'so', 'so', 'happy', 'happy']

e)

None of the above

39.

How many elements in this list?

a)

2

b)

50

c)

98

d)

100

e)

None of the above

40.

How many characters is the following 'item' string?

a)

A. 10

b)

B. 12

c)

C. 14

d)

D. 16

e)

E. None of the above

41.

What's the block we can use to add 'Friday' text?

a)

to week append text 'Friday'

b)

to UPPER CASE 'Friday'

c)

trim spaces from both sides of 'Friday'

d)

'Friday' is empty

e)

None of the above

42.

What’s the expected result?

a)

week

b)

MondayTuesdayWednesdayFriday

c)

Monday

d)

None of the above

e)

Monday, Tuesday, Wednesday, Thursday,

43.

Which of the following scripts gives the same final outcome?

a)

b)

c)

d)

x is a negative number

e)

None of the above

44.

What’s the expected result if the user enters a = 0?

a)

0 is a positive number

b)

0 is a negative number

c)

x is a positive number

d)

x is a negative number

e)

None of the above

45.

Refer to the following block, and respective code for question 4 and 5
What’s the expected result if the user enters x = 5?

a)

5 is a positive number

b)

-5 is a negative number

c)

x is a positive number

d)

x is a negative number

e)

None of the above

46.

What's is "item"?

a)

A. A number

b)

B. A variable

c)

C. Counting how many blocks after "do..."

d)

D. A constant

e)

E. None of the above

47.

What is the expected result?

a)

2

b)

3

c)

8

d)

11

e)

None of the above

48.

sprite.y == sprite.x

What does the sign mean?

a)

equals

b)

greater than

c)

less than

d)

gets the value of

49.

sprite1.x > sprite2.x

Which of the option would make the console log print true?

a)

sprite1.x is 100

sprite2.x is 100

b)

sprite1.x is 200

sprite2.x is 100

c)

sprite1.x is 100

sprite2.x is 200

d)

sprite1.x is 100

sprite2.y is 100

50.

Define: Boolean Expression

a)

A question that can be answered either:

True OR False.

b)

A question that can only be answered:

True.

c)

A question that can only be answered:

False.

d)

A question that can only be answered with a number.

51.

What would the Sprite say if the Test is set to 10?

a)

My name is Bob

b)

I like Chocolate

c)

Hello

d)

I do not know

52.

What is this a definition of: To carry out each instruction in the order they appear?

a)

A. Selection

b)

B. Iteration

c)

C. Sequencing

d)

D. Variable

53.

What is this a definition of: The program makes decisions to take different paths depending on if a condition is True or False?

a)

A. Selection

b)

B. Iteration

c)

 C. Sequencing

d)

D. Variable

54.

What is this type of code known as?

a)

A. Text based code

b)

B. English code

c)

C. Block Based code

d)

D. Program language code

55.
a)
b)
c)
d)
e)
56.
a)

A

b)

B

c)

C

d)

D

e)

E

57.

What is the output of the blockly program:

a)

A. Multiplication of a, b, c

b)

Number of items in the List.

c)

Error in the program

d)

Value of a, b, c

58.

The index of character found in string S:

a)

As the index of character stored in list count2

b)

Greater than index of character stored in list count2

c)

Greater or equal to the index of character stored in list count2

d)

None of the above

59.

What is the output of blockly program:

a)

2

b)

4

c)

6

d)

8

60.

What is the output of blockly program:

a)

2

b)

4

c)

6

d)

8

61.

What is the output of blockly program:

a)

1

b)

2

c)

3

d)

4

62.

What is the output of blockly program:

a)

List of position of the character appear in string S:

b)

Display all characters that not appear in string S

c)

Number of characters in string S

d)

Number of the character appear in string S

63.

Which information is true to tell about the Function?

a)

It has two arguments

b)

After of all, it returns the output result

c)

Calculate multiplication x times value of y

d)

Calculate multiplication y times value of x

64.

What is the output of the following program?

a)

38.5

b)

101.3

c)

1.8

d)

32

65.

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

66.

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

67.

What is the output of the following program?

a)

2

b)

3

c)

4

d)

8

68.

What’s the expected result of x?

a)

24.8

b)

1

c)

The is no solution

d)

77

69.

What’s the output of the following code?

a)

No output because colour cannot be printed

b)

100 50 0

c)

#rrggbb

d)

A random color is represented as text of the form "#rrggbb

70.

What is the expected output?

a)

#0000

b)

#000000

c)

#0000000

d)

#000

71.

An error in a program that prevents the program from running as expected.

a)

bug

b)

debugging

c)

workplane

d)

code

72.

What degree of turn needs to be added to the 'turn right' block to draw a triangle?

a)

60

b)

90

c)

100

d)

120

73.

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

a)

Math

b)

Logic

c)

Loops

d)

None of the above

74.

What is the expected output of the following code?

a)

3

b)

9

c)

150

d)

170

75.

If the user types in 'yellow' what does this program draw?

a)

a yellow rectangle

b)

a red rectangle

c)

a green rectangle

d)

a grey rectangle

76.

Which of the following programs would make the turtle draw these steps. The turtle starts at the bottom left facing to the right (same as it is now).

a)
b)
c)
d)
77.

What is this a definition of:

repeating steps, or instructions , over and over again. This is often called a 'loop'

a)

Sequence

b)

Selection

c)

Variable

d)

Iteration

78.

Which of these blocks do you use to make a variable called side?

a)
b)
c)
d)
79.

What is the output of the following code?

a)

100

b)

81

c)

45

d)

1

e)

None of the above

80.

What is the expected output?

a)

123, 99, 345, 450, 256

b)

Nothing

c)

99, 123, 256, 345, 450

d)

450, 345, 256, 123, 99

e)

345, 450, 256, 99, 123