wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Strand D-Coding

Total questions: 12

Worksheet time: 16mins

Name
Class
Date
1.

What does the Boolean NOT operator do?

a)

A) Changes true to false

b)

B) Adds two numbers

c)

C) Displays a message

d)

D) Repeats a function

2.

What is a function in coding?

a)

A) A tool to create graphics

b)

B) A block of code that performs a specific task

c)

C) A way to store data

d)

D) A type of error

3.

Which of the following is an example of a function?

a)

A) say "Hello"


b)

B) if (x > 10)

c)

C) function greet() { return "Hi"; }

d)

D) for (i = 0; i < 5; i++)

4.

Which of the following is an example of a Variable?

a)

A) say "Hello"


b)

B) if (x > 10)

c)

C) function greet() { return "Hi"; }

d)

D)d1=gotoNearestHealthzone

5.

What is an event in coding?



a)

A) A type of variable

b)

B) An action that can be detected by the program

c)

C) A way to store data

d)

D) A method to loop through code

6.

Study the CodeMonkey program given, what should be the value of “d” for the monkey to collect all the bananas?

(a)  

7.

Write a code using the instructions step, turn, left, right, if, equals, and onKey to help the

monkey collect bananas.

4 lines
8.

Study the diagram given and help the monkey to collect all the bananas using the code, for, if and not with three lines of code.

4 lines
9.

Look closely at the picture and code given, the code consists of some error, rewrite the code with the correct sequence and error free.

4 lines
10.

The coding language used in the coding Adventure is known as (a)   .

11.

The three types of events are onKey, onMouseMove and (a)  

12.

The onMouseMove take an argument, (a)