wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Coding Adventure 3 Quiz

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

What does the 'not' operator do?

a)

It checks if values are equal

b)

It multiplies two values

c)

It reverses the result of a condition

d)

It adds two numbers

2.

What is the purpose of comparison operators?

a)

To create functions

b)

To compare two values

c)

To define variables

d)

To handle events

3.

What event is triggered when a key is pressed?

a)

onClick

b)

onHover

c)

onMouseMove

d)

onKey

4.

What does the '==' operator check?

a)

If one value is less than another

b)

If two values are equal

c)

If one value is greater than another

d)

If a value is not equal

5.

What happens when the 'return' statement is encountered in a function?

a)

The function loops forever

b)

The function prints a message

c)

The function exits and returns a value

d)

The function continues running

6.

What is the purpose of the onClick function?

a)

To handle mouse movement

b)

To define actions when an object is clicked

c)

To compare values

d)

To check keyboard input

7.

What does the function 'health()' return?

a)

The weight of the cow

b)

The monkey's score

c)

The monkey's health

d)

The distance to the banana

8.

What does the 'if' statement do?

a)

It creates a loop

b)

It checks a condition and runs code based on it

c)

It defines a function

d)

It handles events

9.

What is the main use of the mouse movement event?

a)

To click on objects

b)

To move characters in the game

c)

To check keyboard input

d)

To compare scores

10.

What does the function 'calculateArea()' return?

a)

The area of a rectangle

b)

The perimeter of a rectangle

c)

The volume of a cube

d)

The length of a side

11.

What is the purpose of logical operators?

a)

To perform arithmetic calculations

b)

To combine multiple conditions

c)

To define functions

d)

To create loops

12.

What does the 'while' loop do?

a)

It executes code as long as a condition is true

b)

It defines a function

c)

It creates an event listener

d)

It compares two values

13.

Which boolean operator is used to reverse the result of a condition?

a)

and

b)

or

c)

not

d)

if

14.

Which comparison operator is used to check if two values are equal?

a)

==

b)

=

15.

What does the operator > do?

a)

Checks if two values are equal

b)

Checks if the value on the left is less than the value on the right

c)

Checks if the value on the left is greater than the value on the right

d)

Assigns a value to a variable

16.

What does the operator < symbol mean?

a)

Checks if two values are equal

b)

Checks if the value on the left is less than the value on the right

c)

Checks if the value on the left is greater than the value on the right

d)

Assigns a value to a variable

17.

What does the return statement do in a function?

a)

returns the value of function

b)

Prints a message on the screen

c)

Assigns a value to a variable

d)

Checks if a condition is true

18.

Which event is triggered when a key is pressed on the keyboard?

a)

onClick

b)

onMouseMove

c)

onKey

d)

onKeyPress

19.

What is the syntax to define the onKey function in Coding Adventure?

a)

onKey = (key) ->

b)

onKey(key) ->

c)

onKey(key) =>

d)

onKey = key =>

20.

What does the onMouseMove event do?

a)

Moves the mouse on the screen

b)

Changes the position of an object

c)

Prints a message on the screen

d)

Checks if a condition is true

21.

What is the syntax to define the onMouseMove function in Coding Adventure?

a)

onMouseMove = (pos) ->

b)

onMouseMove(pos) ->

c)

onMouseMove(pos) =>

d)

onMouseMove = pos =>

22.

Which event is triggered when the mouse is clicked on?

a)

onClick

b)

onMouseMove

c)

onKey

d)

onKeyPress

23.

What is the purpose of the mover variable in Coding Adventure?

a)

To control the movement of animals

b)

To control the movement of the monkey

c)

To control the movement of the bat

d)

To control the movement of the cow

24.

How many events are used in Coding Adventure Part 3?

a)

1

b)

2

c)

3

d)

4

25.

What is the main use of the not operator in Coding Adventure Part 3?

a)

To prevent the monkey from going to rotten bananas

b)

To compare values in an if statement

c)

To move the characters in the game

d)

To open the gate by pressing keys

26.

What is the purpose of the if statement in Coding Adventure?

a)

To execute a block of code if a condition is true

b)

To define a function

c)

To create a loop

d)

To declare a variable

27.

What do comparison operators do?

a)

Compare two values

b)

Return a value

c)

Trigger an event

d)

Execute a function

28.

What is the purpose of the return statement in a function?

a)

To exit the function and return a value

b)

To trigger an event

c)

To compare values

d)

To define a variable

29.

What happens when the code encounters a return statement?

a)

It exits the function

b)

It triggers an event

c)

It compares values

d)

It defines a variable

30.

What is the function that handles keyboard events?

a)

onKey

b)

onClick

c)

onMouseMove

d)

None of the above

31.

What does the boolean operator "not" do in coding?

a)

Reverses the result of a condition

b)

Checks if a variable is undefined

c)

Compares two values

d)

Checks if a variable is null

32.

Which comparison operator is used to check if two values are exactly the same?

a)

==

b)

<

c)

>

d)

=

33.

When is the "not" operator commonly used in Coding Adventure?

a)

In an until loop or in an if statement

b)

In a for loop

c)

In a while loop

d)

In a switch statement

34.

What does the comparison operator ">" signify in coding?

a)

Greater than

b)

Less than

c)

Equal to

d)

Not equal to

35.

When is the onMouseMove event triggered in Coding Adventure?

a)

Each time the mouse is moved

b)

Each time a key is pressed

c)

Each time the mouse is clicked

d)

Each time an object is clicked

36.

What does the onClick event handle in Coding Adventure?

a)

Mouse clicks on specific objects

b)

Keyboard events

c)

Mouse movements

d)

Comparison events

37.

How is the onClick function defined for handling mouse click events in Coding Adventure?

a)

object.onClick = () -> # Your code here

b)

onClick: () => // Your code here

c)

function onClick() { // Your code here }

d)

onClick() { // Your code here }

38.

If you want to change the result of a condition "yes" to "no" and "no" to "yes", you need to use the Boolean operator called

a)

and

b)

or

c)

not

d)

all of the above

39.

If the condition is met(the answer is yes), then the code inside the if statement is executed.

a)

Plagiarism

b)

Conditional statement

c)

Loop statement

d)

Return statement

40.

If the condition is met(the answer is yes), then the code inside the if statement is executed.

a)

Plagiarism

b)

Conditional statement

c)

Loop statement

d)

Return statement

41.

Which function returns the distance between the monkey and an object.

a)

turnTo

b)

distanceTo

c)

watching

d)

sleeping

42.

The event function(event handler) that is triggered any time a key is pressed on the keyboard is

a)

onMouseMove

b)

Onkey

c)

Onclick

d)

If key

43.

The syntax to define the onMouseMove function is:

a)

onMouseMove = () ->

b)

MouseMove = (pos) ->

c)

onMouseMove=(pos) ->

d)

onMouseMove (pos)= ->

44.

In Coding Adventure, the mouse movement event is mainly used to move the ______

a)

monkey

b)

cursor

c)

banana

d)

bat

45.

The type of loop used to repeat instruction for specific number of times.

a)

until loop

b)

for loop

c)

while loop

d)

nested loop

46.

Which of the following operators is NOT used to compare values?

a)

==

b)

<

c)

>

d)

%

47.

What will be the missing code?

a)

TurnTo banana

b)

step -14

c)

turtle. step d

d)

d = 6

48.

1. What does the X represent?

a)

72

b)

10

c)

55

d)

x

49.

What programming language is taught by Coding Adventure course?

a)

coffeeScript

b)

python

c)

typescript

d)

HTML

50.

Coding Adventure course provides students to complete the challenges in two modes. They are

a)

Challenge mode & Skill mode

b)

Skill mode & Story mode

c)

Game mode & Skill mode

d)

Story mode & Challenge mode