Karel Commands
CodeHS
Writing Complete Programs and Top Down Design
Loops
Decisions
100

This command will move Karel one spot in the direction they are facing.

What is move();

100

The name of the programming language we are using on CodeHS.com.

What is Java.

100

This is where we put all the commands for Karel.

What is the run() method.

100

The loop below repeats this many times:

for(int i = 0; i < 99; i++){

}

What is 99

100
This is what we call a mistake in our program.

What is a bug.

200

This command will rotate Karel 90 degrees to the left.

What is turnLeft();

200

This is the part of the CodeHS site where we navigate through the CodeHS classroom site.

What is the menu.

200

We want our run() method to tell this when trying to solve a problem.

What is a story.

200

The loop below starts and ends at these two numbers.

for(int i = 0; i < 1001; i++){

}

What is 0 and 1000.

200

When writing the if statement, the condition is tested and gives us one of these two answers.

What is true or false.

300

This is the command we use for Karel to pick up a tennis ball.

What is takeBall();

300

In this part of CodeHS, this is where we will find our Java files associated with our program.

What is the file navigation window.

300

The body of any command we create, the run() method, or any block of code, goes in a set of these.

What is a set of curly braces.

300

This what what we call the code that is within the curly braces of a loop.

What is the body of the loop.

300

This is when we run the body of the else in an if/else statement.

What is when the if-statement results in a false answer.

400

This is the conditional statement we use to check to see if Karel's front is clear.

What is frontIsClear();

400

This is where we type the code.

What is the editor window.

400

When we hit the "Run" button on our programs, the run() method is said to be this.

What is called or invoked.

400

In a while-loop, this is what we insert in the parentheses after the word while.

What is a condition or conditional statement.

400

This is how we write an if-statement to check to see if a ball is present, and if it is, Karel picks up the tennis ball.

What is:

if(ballsPresent()){
        takeBall();
}

500

This is the command we would use to check to see if Karel is facing the north direction.

What is facingNorth();

500

When we run the code, the result shows up in this window.

What is output window, shell, or console.

500

This is the code we use to have Karel turn right.

What is private void turnRight(){
turnLeft();
turnLeft();
turnLeft();
}

500

This is a while-loop that will move Karel as long as the front is clear.

What is:

while(frontIsClear()){
    move();
}

500

This is how we write an if/else statement to have Karel put down a ball if one is not present, otherwise, take a ball if one is present.

What is:

if(noBallsPresent()){
    putBall();
}
else{
    takeBall();
}