
CodeCombat CS2 (JS)
Quiz
•
Computers
•
7th - 12th Grade
•
Hard
Heather Virtue
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Code on line 16 should read:
hero.attackEnemy();
hero.attack(enemy);
var = hero.attack(enemy);
hero.findNearestEnemy();
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which punctuation mark is missing in lines 12-27?
{
}
(
;
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What does the following lines of code mean?
when there is an enemy, the hero will attack or cleave
if there is not an enemy available to cleave, the hero will attack instead
if there is an enemy, the hero will try to cleave if possible. If not, it will attack.
the hero moves to a position and then cleaves or attacks an enemy unless there is a rainstorm
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Study the following code. Which line contains the error?
10
4
3
6
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What would be the correct way to code lines 13 & 15?
if(distance < 5) {
hero.attack(distance); }
else {
hero.shield
if(distance < 5) {
hero.attack(enemy); }
else {
hero.shield();
}
if(distance > 5) {
hero.attack(enemy);
else
hero.shield();
}
if(distance < 5) {
hero.attack(enemy); }
else {
hero.shield();
}
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which line is missing code in order for the program to function correctly?
2
6
8
10
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following options gives the best description of the code?
if the goFetch function is working, the pet will find the nearest enemy and give it the potion
if hero finds a potion, the pet will be sent to fetch the potion and bring it back
if the pet finds a potion, the hero will be sent to find it and bring it back to heal the pet
if the potion is within range, the hero will identify it and give it to the pet
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
G8 W 1 IGCSE 0417 Types of computer
Quiz
•
8th Grade
14 questions
CPA CPF5 Computer Storage (Sec 2)
Quiz
•
9th Grade
15 questions
File Explorer and Sorting Files
Quiz
•
8th Grade
14 questions
CPU and Cache
Quiz
•
11th Grade
10 questions
Google Apps
Quiz
•
4th - 12th Grade
15 questions
Coding Quiz
Quiz
•
6th - 10th Grade
10 questions
Computer Aided Design
Quiz
•
11th Grade
14 questions
ABC in python
Quiz
•
9th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Computers
18 questions
Company Logos
Quiz
•
6th - 8th Grade
20 questions
Logos
Quiz
•
2nd - 8th Grade
18 questions
Artificial Intelligence and Machine Learning Quiz
Quiz
•
9th Grade
35 questions
Computer Terminology Exercise #1 ( Multiple Choice)
Quiz
•
9th Grade
20 questions
Computer Components Exercise #4 - CTEA
Quiz
•
9th - 12th Grade
18 questions
Company Logos
Quiz
•
6th - 8th Grade
30 questions
Computer Terminology Exercise #1 ( Fill Ins)
Quiz
•
9th Grade
