This command will move Karel one spot in the direction they are facing.
What is move();
This is where we put all the commands for Karel.
What is the run() method.
The loop below repeats this many times:
for(int i = 0; i < 99; i++){
}
What is 99
What is a bug.
This command will rotate Karel 90 degrees to the left.
What is turnLeft();
This is the part of the CodeHS site where we navigate through the CodeHS classroom site.
What is the menu.
We want our run() method to tell this when trying to solve a problem.
What is a story.
The loop below starts and ends at these two numbers.
for(int i = 0; i < 1001; i++){
}
What is 0 and 1000.
When writing the if statement, the condition is tested and gives us one of these two answers.
What is true or false.
This is the command we use for Karel to pick up a tennis ball.
What is takeBall();
In this part of CodeHS, this is where we will find our Java files associated with our program.
What is the file navigation window.
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.
This what what we call the code that is within the curly braces of a loop.
What is the body of the loop.
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.
This is the conditional statement we use to check to see if Karel's front is clear.
What is frontIsClear();
This is where we type the code.
What is the editor window.
When we hit the "Run" button on our programs, the run() method is said to be this.
What is called or invoked.
In a while-loop, this is what we insert in the parentheses after the word while.
What is a condition or conditional statement.
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();
}
This is the command we would use to check to see if Karel is facing the north direction.
What is facingNorth();
When we run the code, the result shows up in this window.
What is output window, shell, or console.
This is the code we use to have Karel turn right.
What is private void turnRight(){
turnLeft();
turnLeft();
turnLeft();
}
This is a while-loop that will move Karel as long as the front is clear.
What is:
while(frontIsClear()){
move();
}
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();
}