NEW
Font size
WorksheetsCode Combat Review (Python)
Total questions: 10
Worksheet time: 1hrs 16mins
Which line of code is correct?
hero.MoveLeft()
heroMoveLeft();
hero.moveleft(:
hero.moveLeft()
Which line of code will make the hero move up 4 times?
4.hero.Move.Up();
hero.MoveUp(4);
hero.4MoveUp();
hero.Move4Up();
What must every line of code end with?
comma ,
semi-colon ;
parantheses ()
period .
Which line of code will attack Kratt?
hero.attack("Kratt")
hero.attack("kratt");
hero.attack(Kratt);
Hero.Attack.Kratt;
What is the correct way to write a while loop?
while {
while.true {
while (loop)
while True:
How do you create a variable for enemy1 Gert?
enemy1 = "Gert"
enemy1 = Gert
var.enemy1 = Gert;
var.Enemy.1 = "Gert";
You can enter a number as an argument to instruct your object to move more than one space at a time.
True
False
It is not important to capitalize the name of the variables.
True
False
A string will always have quotation marks.
True
False
What is the main reason we use loops?
It saves time
It is faster to create
It is easier to type
To repeat a block of code without having to retype
