CodeCombat CS2 (JS)

CodeCombat CS2 (JS)

7th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

Computer Security

Computer Security

8th - 10th Grade

10 Qs

3rd week g9 summative

3rd week g9 summative

7th - 12th Grade

15 Qs

Ethical Issues of I.T.

Ethical Issues of I.T.

7th - 8th Grade

11 Qs

JAVA IDENTIFIERS

JAVA IDENTIFIERS

6th - 8th Grade

14 Qs

PITD Assessment

PITD Assessment

8th Grade

10 Qs

Debugging Challenge 2

Debugging Challenge 2

7th - 12th Grade

15 Qs

Printers

Printers

9th - 12th Grade

10 Qs

CodeCombat CS2 (JS)

CodeCombat CS2 (JS)

Assessment

Quiz

Computers

7th - 12th Grade

Hard

Created by

Heather Virtue

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

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

Media Image

Which punctuation mark is missing in lines 12-27?

{

}

(

;

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

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

Media Image

Study the following code. Which line contains the error?

10

4

3

6

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?