CodeCombat CS2 (JS)

CodeCombat CS2 (JS)

7th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

ICT as Platform for Change

ICT as Platform for Change

11th - 12th Grade

10 Qs

Understanding Computers #2 the CPU

Understanding Computers #2 the CPU

8th Grade

10 Qs

Numpy-1

Numpy-1

9th - 12th Grade

10 Qs

Quiz 8 (01.09.2021)

Quiz 8 (01.09.2021)

1st - 12th Grade

10 Qs

C3.5 - Video 6 - AI

C3.5 - Video 6 - AI

11th Grade

10 Qs

Online Sources

Online Sources

7th - 8th Grade

10 Qs

Y8 - Pre-Bebras

Y8 - Pre-Bebras

9th Grade

15 Qs

Year 7 - Bohunt E-Mail

Year 7 - Bohunt E-Mail

7th 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

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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?