Font size
WorksheetsCode Combat Intro
Total questions: 30
Worksheet time: 1hrs 13mins
The rules for writing codes, are called:
Syntax
Rulebook
They are things or characters that can perform actions:
Variables
Objects
The actions an object performs :
Methods(function)
Movement
A way of repeating code is called:
Loop
Movement
A symbol/name that represents data.
Comment
Variable
What is the name of the programming language you used in Code Combat?
Python
HTML
What do we call identifying and removing errors from code?
Refining
Debugging
You can comment out a statement with...
hero.delete();
#
In order to move up, which code would you use
hero.moveUpup()
hero.moveUp()
What code can be used to move to x coordinate 10, and y coordinate 25?
hero.moveXY(25, 10);
hero.moveXY(10, 25);
Which of the following is a comment? PICK ALL ANSWERS THAT ARE CORRECT!
#Move towards the gem
#Don't touch the spikes!
#Type your code below and click Run when you're done
hero.moveRight()
What is the sprite in this program?
Hero
Run
Which line includes the command?
5
1
How many times will this hero move?
10
6
Which line starts the loop?
8
5
Which line does the loop end?
7
5
How many times will this hero move?
4
unknown
What do the values "36,34" mean in line 4?
Y = 36, X = 34
X = 36, Y = 34
Which line of code is correct?
hero.moveLeft()
hero.MoveLeft()
Which line of code will make the hero move up 4 times?
hero.MoveUp(4);
hero.Move4Up();
What must every line of code end with?
parantheses ()
comma ,
What is the main reason we use loops?
To repeat a block of code without having to retype
It is easier to type
What is the purpose of using comments in code?
To make code run faster
To explain what the code does
What does iterate mean?
To perform a process repeatedly.
To perform a process once.
What is the term for a mistake in your code?
Loop
Bug
What should the next code be?
MOVE UP
MOVE DOWN
MOVE LEFT
ATTACK
What did this person forget to do?
collect the gems
attack the guard
go to the map
move UP
What is computer code?
a language that the person speaks
a language that the computer speaks
Which of the following is an example of a code language?
starbucks
coffee code
java script
cup of joe
How do you create a variable for enemy1 Gert?
enemy1 = "Gert"
enemy1 = Gert
var.enemy1 = Gert;
var.Enemy.1 = "Gert";
