CodeCombat CS2 (JS)

CodeCombat CS2 (JS)

7th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Contact Center Sevices

Contact Center Sevices

7th - 10th Grade

10 Qs

แบบทดสอบก่อนเรียน บทที่ 1 ตุ๊กตาแม่ลูก

แบบทดสอบก่อนเรียน บทที่ 1 ตุ๊กตาแม่ลูก

11th Grade

10 Qs

Image Editing

Image Editing

7th Grade

12 Qs

Word 2016 Lesson 1

Word 2016 Lesson 1

9th - 12th Grade

10 Qs

ICT as Platform for Change

ICT as Platform for Change

11th - 12th Grade

10 Qs

emtech

emtech

12th Grade

10 Qs

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

Test on Python Function

Test on Python Function

11th - 12th Grade

12 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?