
CodeCombat CS2 (JS)
Quiz
•
Computers
•
7th - 12th Grade
•
Hard
Heather Virtue
Used 5+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
10 questions
Lesson 1 Introduction to Database System
Quiz
•
10th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
LA1.C1: Introduction to Small Basic
Quiz
•
9th Grade
13 questions
WJEC GCSE ICT Unit 1 E-Mail
Quiz
•
9th - 10th Grade
10 questions
Scratch
Quiz
•
KG - Professional Dev...
12 questions
Adventure game project
Quiz
•
7th - 8th Grade
10 questions
Pre-Test: Search Engine
Quiz
•
7th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
