
CodeHS - Java Karel - Sec 1-13 Review
Authored by Chad Barker
Computers
9th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which is DEFINING the buildTower() method?
private void buildTower()
{
}
buildTower();
while(frontIsClear())
{
}
for(int i = 0; i<10; i++)
{
}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens with the following?
for(int i = 0; i < 6; i++)
{
putBall();
}
0 tennis balls are put down
6 tennis balls are put down
0 tennis balls are picked up
6 tennis balls are picked up
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens with the following code?
while(frontIsClear())
{
move()
}
Karel moves 5 times
Karel picks up an unknown number of tennis balls
Karel puts down an unknown number of tennis balls
Karel moves an unknown number of times
4.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
What line does the run method end on?
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Why do we use a for loop in programming
Easier to read
It's more efficient
To repeat an action a number of times
To repeat an action an unknown number of times
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code is correct? Karel starts in the bottom left corner and the starting world has zero tennis balls.
for(int i = 0; i < 4; i++)
{
move();
}
putBall();
for(int i = 0; i < 2; i++)
{
move();
}
putBall();
for(int i = 0; i < 3; i++)
{
move();
}
putBall();
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
which code is correct? Karel starts in the bottom left corner and the starting world has zero tennis balls.
for(int i = 0; i < 2; i++)
{
move();
turnLeft();
move();
}
putBall();
move();
turnRight();
move();
putBall();
move();
turnLeft();
move();
putBall();
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?