Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Karel Review

Total questions: 37

Worksheet time: 19mins

Name
Class
Date
1.

Why do we use functions in programming?

a)

Break down our program into smaller parts

b)

Avoid repeating code

c)

Make our program more readable

d)

All of the above

2.

How many times should the start function be defined in a program?

a)

0

b)

1

c)

2

d)

However many you like

3.

How many times should the start function be defined in a program?

a)

0

b)

1

c)

2

d)

However many you like

4.

Which of these is a valid Karel command?

a)

move;

b)

MOVE

c)

move();

d)

move()

5.

If Karel is facing South and the code:

turnLeft();

turnLeft();

runs; which direction is Karel facing now?

a)

North

b)

South

c)

East

d)

West

6.

What is a code comment?

a)

A way to teach Karel a new word

b)

A way to give notes to the reader to explain what your code is doing

c)

A message to your teacher in code

d)

A place to write whatever you want in your code

7.
Which of the following is incorrect?
a)
putBall();
b)
Takeball();
c)
move();
d)
turnLeft();
8.
Karel's world is made up of streets and ______
a)
Boulevards
b)
Alleys
c)
Avenues
d)
Dead Ends
9.
Every command must end with {}
a)
True 
b)
False
10.
An error in a program that prevents the program from running as expected.
a)
Error report
b)
Bug
c)
Mistake
d)
Algorithm
11.
A list of steps to finish a task. A set of instructions that can be performed with or without a computer. 
a)
Algorithm
b)
Plan
c)
Binary
d)
Logorithm
12.
An instruction for the computer. Many of these put together make up algorithms and computer programs. 
a)
Code
b)
Plan
c)
Program
d)
Command
13.
Statements that only run under certain conditions or situations.
a)
Conditionals
b)
Run Statements
c)
Digital Statements
d)
Command
14.
Finding and fixing errors in programs
a)
Tech support
b)
Decompose
c)
Debugging
d)
Fixing
15.
What command will place a ball down in a spot?
a)
placeBall();
b)
Putball();
c)
putball():
d)
putBall();
16.
If Karel is facing North and the code
turnLeft(); 
turnLeft();
turnLeft();
runs; which direction is Karel facing now?
a)
North
b)
East
c)
South
d)
West
17.
In coding terms, the action of doing something over and over again.
a)
Repeating
b)
Repetition
c)
Loop
d)
Do-over
18.
A piece of code that you can easily call over and over again. 
a)
Repeat
b)
Functions
c)
Procedures
d)
Fractions
19.
Loops are used to repeat parts of a program
a)
True
b)
False
20.

Karel is a Cat?

a)

True

b)

False

21.

The code in the picture will move Karel in a square.

a)

True

b)

False

22.

Which code will put Karel in the position shown in second world?

a)

putBall(); putBall(); move(); move();

b)

move(); putBall(); move(); putBall();

c)

putBall(); move(); putBall(); move();

d)

move(); putBall(); putBall(); move();

23.

Is this Function written correctly?

a)

True

b)

False

24.

What is the name of this function?

a)

function

b)

spin()

c)

3 turnLeft();

d)

spin();

25.

Which function will allow Karel to spin in circle?

a)
b)
c)
d)
26.

What is a reason we use functions?

a)

Break down our program into smaller parts.

b)

Because it is more complex.

c)

It looks cool and helps the fight against martians!

d)

Functions are basically Algebra and programmers like Algebra.

27.

What is top down design?

a)

Top down design is a way of designing your program by starting with the biggest problem and breaking it down into smaller and smaller pieces that are easier to solve.

b)

Top down design is a way that you can create designs on a computer to put on a web page

c)

Top down design is a way of designing your programs starting with the individual commands first

d)

Top down design is a way to use loops and classes to decompose the problem

28.

What commands does SuperKarel know that regular Karel does not?

a)

turnLeft() and jump()

b)

turnRight() and jump()

c)

turnAround() and turnRight()

d)

turnAround() and jump()

29.

Which of the following is the correct for loop syntax to make Karel turn left 4 times?

a)

for(var i = 0; i = 4; i++) {

turnLeft();

}

b)

for(var i = 0; i < 4; i++) {

turnLeft();

}

c)

for var i = 0; i < 4; i++

turnLeft();

d)

for(var i = 0, i < 4, i++) {

turnLeft();

}

30.

What is the best way for Karel to move 10 times?

a)

move();

move();

move();

move();

move();

move();

move();

move();

move();

move();

b)

for (var i = 0; i < 10; i++) {

move();

}

c)

move(10);

d)

move10();

31.

Which "if" statement is correctly written?

a)

for (condition) {

//code in here

}

b)

if (condition) {

//code in here

}

c)

if (var i = 0; i < count; i++) {

//code in here

}

d)

if false {

//code in here

}

32.

Why do we use if statements in JavaScript?

a)

To break out of some block of code

b)

To do something only if a condition is true

c)

To do something while a condition is true

d)

To repeat something for a fixed number of times

33.

Why do we use while loops in JavaScript?

a)

To break out of some block of code

b)

To do something if a condition is true

c)

To repeat some code while a condition is true

d)

To repeat something for a fixed number of times

34.

What do we use control structures for in JavaScript?

a)

Control the flow of the program; how the commands execute.

b)

Start our JavaScript program

c)

Store information for later

d)

Teach Karel new commands

35.

You need to write a program where Karel will take a ball if there is a ball present, otherwise Karel should put down a ball.

Which control structure do you need to use?

a)

For Loop

b)

While Loop

c)

If Statement

d)

If/Else Statement

e)

None of these

36.

You need to write a program that has Karel move 6 times and then put a ball.

Which control structure do you need to use?

a)

Foor Loop

b)

While Loop

c)

If Statement

d)

If/Else Statement

e)

None of these

37.

You need to write a program that has Karel move if the front is clear, but if it isn’t clear, Karel will do nothing.

Which control structure do you need to use?

a)

For Loop

b)

While Loop

c)

If Statement

d)

If/Else Statement

e)

None of these