Choose the right code to assign function onSpawn to one soldier in the game with event type “spawn”
course2 lesson18

Quiz
•
Academy OneSpace
•
Computers
•
2nd Grade
•
1 plays
•
Medium
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
soldier.on(“spawn”,onSpawn)
game.setActionFor(“soldier”,”spawn”, onSpawn)
soldier.on(onSpawn, “spawn”)
game.setActionFor(soldier,”spawn”, onSpawn)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the code setActionFor do?
Set a code to a munchkin to attack
Set a function to a character to attack
Set a function to one character
Set a function to bunch of characters
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the code unit=event.target do here?
Targets the character that going to be spawned
Targets the enemy that the hero needs to attack
Targets the character that the function onSpawn is going to be assigned to
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this code which character is going to say “attaaaack”?
Soliders
Archers and soldiers
archers
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the right example of game data?
Time of the game
The hero’s health
Number of enemies defeated
All of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the right code to track and display the time of the game
ui.track(“time”,game)
ui.track(game, time)
ui.track(game, “time”)
ui.track(time,game)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the right code to generate a random number between 15 and 70 and store it to the variable x
x = game.randomInteger(15, 70)
x = game.RandomInteger(15, 70)
x = game.randominteger(15, 70)
x = Game.RandomInteger(15, 70)
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what’s an event handler?
A code to handle an event.
A function that can be assigned to a character in the game
A code that makes an event occurs
a function to handle an event in the game
Similar Resources on Quizizz
10 questions
Events and Actions

Quiz
•
1st - 5th Grade
11 questions
How to Code a Sandcastle!

Quiz
•
2nd Grade
10 questions
Scratch Review

Quiz
•
2nd - 5th Grade
10 questions
Pictoblox 7

Quiz
•
1st - 9th Grade
12 questions
Anybody Can Code

Quiz
•
KG - 5th Grade
10 questions
Kuis Komputer

Quiz
•
2nd Grade - University
10 questions
Code.org Maze

Quiz
•
2nd - 3rd Grade
10 questions
Scratch intro & Pen Commands Quiz

Quiz
•
1st - 10th Grade
Popular Resources on Quizizz
39 questions
Respect and How to Show It

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
Discover more resources for Computers
10 questions
Fire Drill

Quiz
•
2nd - 5th Grade
15 questions
Math Review

Quiz
•
2nd Grade
20 questions
Telling Time to 5 Minutes

Quiz
•
2nd Grade
20 questions
2nd Grade Math Review #2

Quiz
•
2nd Grade
10 questions
Memorial Day

Quiz
•
2nd Grade
12 questions
Summer Trivia

Quiz
•
1st - 5th Grade
50 questions
Math Review

Quiz
•
2nd Grade
20 questions
Math Review

Quiz
•
2nd Grade