NEW
Font size
WorksheetsCoding Adventure 3 Quiz
Total questions: 50
Worksheet time: 25mins
What does the 'not' operator do?
It checks if values are equal
It multiplies two values
It reverses the result of a condition
It adds two numbers
What is the purpose of comparison operators?
To create functions
To compare two values
To define variables
To handle events
What event is triggered when a key is pressed?
onClick
onHover
onMouseMove
onKey
What does the '==' operator check?
If one value is less than another
If two values are equal
If one value is greater than another
If a value is not equal
What happens when the 'return' statement is encountered in a function?
The function loops forever
The function prints a message
The function exits and returns a value
The function continues running
What is the purpose of the onClick function?
To handle mouse movement
To define actions when an object is clicked
To compare values
To check keyboard input
What does the function 'health()' return?
The weight of the cow
The monkey's score
The monkey's health
The distance to the banana
What does the 'if' statement do?
It creates a loop
It checks a condition and runs code based on it
It defines a function
It handles events
What is the main use of the mouse movement event?
To click on objects
To move characters in the game
To check keyboard input
To compare scores
What does the function 'calculateArea()' return?
The area of a rectangle
The perimeter of a rectangle
The volume of a cube
The length of a side
What is the purpose of logical operators?
To perform arithmetic calculations
To combine multiple conditions
To define functions
To create loops
What does the 'while' loop do?
It executes code as long as a condition is true
It defines a function
It creates an event listener
It compares two values
Which boolean operator is used to reverse the result of a condition?
and
or
not
if
Which comparison operator is used to check if two values are equal?
==
=
What does the operator > do?
Checks if two values are equal
Checks if the value on the left is less than the value on the right
Checks if the value on the left is greater than the value on the right
Assigns a value to a variable
What does the operator < symbol mean?
Checks if two values are equal
Checks if the value on the left is less than the value on the right
Checks if the value on the left is greater than the value on the right
Assigns a value to a variable
What does the return statement do in a function?
returns the value of function
Prints a message on the screen
Assigns a value to a variable
Checks if a condition is true
Which event is triggered when a key is pressed on the keyboard?
onClick
onMouseMove
onKey
onKeyPress
What is the syntax to define the onKey function in Coding Adventure?
onKey = (key) ->
onKey(key) ->
onKey(key) =>
onKey = key =>
What does the onMouseMove event do?
Moves the mouse on the screen
Changes the position of an object
Prints a message on the screen
Checks if a condition is true
What is the syntax to define the onMouseMove function in Coding Adventure?
onMouseMove = (pos) ->
onMouseMove(pos) ->
onMouseMove(pos) =>
onMouseMove = pos =>
Which event is triggered when the mouse is clicked on?
onClick
onMouseMove
onKey
onKeyPress
What is the purpose of the mover variable in Coding Adventure?
To control the movement of animals
To control the movement of the monkey
To control the movement of the bat
To control the movement of the cow
How many events are used in Coding Adventure Part 3?
1
2
3
4
What is the main use of the not operator in Coding Adventure Part 3?
To prevent the monkey from going to rotten bananas
To compare values in an if statement
To move the characters in the game
To open the gate by pressing keys
What is the purpose of the if statement in Coding Adventure?
To execute a block of code if a condition is true
To define a function
To create a loop
To declare a variable
What do comparison operators do?
Compare two values
Return a value
Trigger an event
Execute a function
What is the purpose of the return statement in a function?
To exit the function and return a value
To trigger an event
To compare values
To define a variable
What happens when the code encounters a return statement?
It exits the function
It triggers an event
It compares values
It defines a variable
What is the function that handles keyboard events?
onKey
onClick
onMouseMove
None of the above
What does the boolean operator "not" do in coding?
Reverses the result of a condition
Checks if a variable is undefined
Compares two values
Checks if a variable is null
Which comparison operator is used to check if two values are exactly the same?
==
<
>
=
When is the "not" operator commonly used in Coding Adventure?
In an until loop or in an if statement
In a for loop
In a while loop
In a switch statement
What does the comparison operator ">" signify in coding?
Greater than
Less than
Equal to
Not equal to
When is the onMouseMove event triggered in Coding Adventure?
Each time the mouse is moved
Each time a key is pressed
Each time the mouse is clicked
Each time an object is clicked
What does the onClick event handle in Coding Adventure?
Mouse clicks on specific objects
Keyboard events
Mouse movements
Comparison events
How is the onClick function defined for handling mouse click events in Coding Adventure?
object.onClick = () -> # Your code here
onClick: () => // Your code here
function onClick() { // Your code here }
onClick() { // Your code here }
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
and
or
not
all of the above
If the condition is met(the answer is yes), then the code inside the if statement is executed.
Plagiarism
Conditional statement
Loop statement
Return statement
If the condition is met(the answer is yes), then the code inside the if statement is executed.
Plagiarism
Conditional statement
Loop statement
Return statement
Which function returns the distance between the monkey and an object.
turnTo
distanceTo
watching
sleeping
The event function(event handler) that is triggered any time a key is pressed on the keyboard is
onMouseMove
Onkey
Onclick
If key
The syntax to define the onMouseMove function is:
onMouseMove = () ->
MouseMove = (pos) ->
onMouseMove=(pos) ->
onMouseMove (pos)= ->
In Coding Adventure, the mouse movement event is mainly used to move the ______
monkey
cursor
banana
bat
The type of loop used to repeat instruction for specific number of times.
until loop
for loop
while loop
nested loop
Which of the following operators is NOT used to compare values?
==
<
>
%
What will be the missing code?
TurnTo banana
step -14
turtle. step d
d = 6
1. What does the X represent?
72
10
55
x
What programming language is taught by Coding Adventure course?
coffeeScript
python
typescript
HTML
Coding Adventure course provides students to complete the challenges in two modes. They are
Challenge mode & Skill mode
Skill mode & Story mode
Game mode & Skill mode
Story mode & Challenge mode
