Karel Commands
Loops
If/else statements
Functions
Mumbo Jumbo
100

This is how you tell Karel to move one space.

move();

100

We use this to repeat a code for any given amount of time.

A loop.

100

This is an example of what?

if(condition){

     /* code */

}

If statement.

100

We use these to teach Karel new commands.

Functions.

100

What type of animal is Karel?

Dog.

200

Karel will not be able to follow this command, why?


turnleft();

The l should be a capital L.

200

We use this type of loop to repeat code a fixed number of times.

For loops.

200

This is an example of what?

if(condition){

     /* code if condition is true */

}else{

     /*code to run otherwise*/

}

If/else Statement.

200

This function starts all of our programming in Karel.

function start(){

}

200

The edges of Karel's world are known as.

Walls.

300

This punctuation follows all of our Karel commands before going to the next.

semi-colon.

300

We use this loop to repeat a code while something else is true.

A while loop.

300

When we have a mistake in our program is is called what?

A bug.

300

This code represents what function in Karel:

turnLeft();

turnLeft();

turnLeft();

function turnRight() {

}

300

This punctuation indicates what?


/* */

A multi line comment.

400

These are the two commands SuperKarel knows that Karel does not.

turnAround();

turnRight();

400

What is wrong with this loop?

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

     move()

}

Missing a semicolon

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

     move();

}

400

Karel is at the right edge of the world facing North. If this code is run what will happen?

if(frontIsClear()){

     move();

}

Karel will move 1 space North.

400

We call a function this many times in our programs.

As many as needed.

400

The rows (left to right) in Karels World are known as this.

Streets.

500

This is the term to define a command that is true or false.

Boolean.

500

what condition should be used in this while loop to get Karel to pick up all the tennis balls on the current location?

while (_____){

     takeBall();

}

ballsPresent()

500

Say Karel is on a location with one tennis ball. After the following code runs, how many tennis balls will there be at that location?

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

     if (ballsPresent()) {        

          takeBall();    

     } else {        

          putBall();        

          putBall();    

     } 

}

1

500

what does the mystery function do?

function mystery(){

     while (noBallsPresent()){

           move();

     }

}


Karel moves until it is on a ball.

500

The columns in Karel's world are known as this.

Avenues.

M
e
n
u