wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Code Combat Intro

Total questions: 30

Worksheet time: 1hrs 13mins

Name
Class
Date
1.

The rules for writing codes, are called:

a)

Syntax

b)

Rulebook

2.

They are things or characters that can perform actions:

a)

Variables

b)

Objects

3.

The actions an object performs :

a)

Methods(function)

b)

Movement

4.

A way of repeating code is called:

a)

Loop

b)

Movement

5.

A symbol/name that represents data.

a)

Comment

b)

Variable

6.

What is the name of the programming language you used in Code Combat?

a)

Python

b)

HTML

7.

What do we call identifying and removing errors from code?

a)

Refining

b)

Debugging

8.

You can comment out a statement with...

a)

hero.delete();

b)

#

9.

In order to move up, which code would you use

a)

hero.moveUpup()

b)

hero.moveUp()

10.

What code can be used to move to x coordinate 10, and y coordinate 25?

a)

hero.moveXY(25, 10);

b)

hero.moveXY(10, 25);

11.

Which of the following is a comment? PICK ALL ANSWERS THAT ARE CORRECT!

a)

#Move towards the gem

b)

#Don't touch the spikes!

c)

#Type your code below and click Run when you're done

d)

hero.moveRight()

12.

What is the sprite in this program?

a)

Hero

b)

Run

13.

Which line includes the command?

a)

5

b)

1

14.

How many times will this hero move?

a)

10

b)

6

15.

Which line starts the loop?

a)

8

b)

5

16.

Which line does the loop end?

a)

7

b)

5

17.

How many times will this hero move?

a)

4

b)

unknown

18.

What do the values "36,34" mean in line 4?

a)

Y = 36, X = 34

b)

X = 36, Y = 34

19.

Which line of code is correct?

a)

hero.moveLeft()

b)

hero.MoveLeft()

20.

Which line of code will make the hero move up 4 times?

a)

hero.MoveUp(4);

b)

hero.Move4Up();

21.

What must every line of code end with?

a)

parantheses ()

b)

comma ,

22.

What is the main reason we use loops?

a)

To repeat a block of code without having to retype

b)

It is easier to type

23.

What is the purpose of using comments in code?

a)

To make code run faster

b)

To explain what the code does

24.

What does iterate mean?

a)

To perform a process repeatedly.

b)

To perform a process once.

25.

What is the term for a mistake in your code?

a)

Loop

b)

Bug

26.

What should the next code be?

a)

MOVE UP

b)

MOVE DOWN

c)

MOVE LEFT

d)

ATTACK

27.

What did this person forget to do?

a)

collect the gems

b)

attack the guard

c)

go to the map

d)

move UP

28.

What is computer code?

a)

a language that the person speaks

b)

a language that the computer speaks

29.

Which of the following is an example of a code language?

a)

starbucks

b)

coffee code

c)

java script

d)

cup of joe

30.

How do you create a variable for enemy1 Gert?

a)

enemy1 = "Gert"

b)

enemy1 = Gert

c)

var.enemy1 = Gert;

d)

var.Enemy.1 = "Gert";