As Long As It’s True…
Super Tools, Super Power
If it is true, do it!
Two paths, one choice!
For every step, the loop is kept.”
100

What does a while loop do?

Repeats code as long as the condition is true.

100

Which command turns Karel right?

turnRight();

100

What keyword starts a decision statement in Karel?

if

100

What does an else clause do?

Runs when the if condition is false.

100

What is the purpose of a for loop?

To repeat code a set number of times.

200

Write a while loop that makes Karel move forward until it’s not clear.

while front_is_clear():

    move()

200

Which command makes Karel turn around?

turnAround();

200

 What happens if the condition in an if statement is false?

Nothing happens; Karel skips the code inside the if.

200

What happens with Karel with this code:

if (ballsPresent()) {

  takeBall();

} else {

  move();

}

If there is a ball → take it; else → move.

200

What happens to Karel in this code?

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

  move();

}

 Karel moves forward 5 steps.

300

True or False: A while loop always runs at least once.

A while loop always runs at least once.

300

If Karel faces North and runs turnRight();, which way will Karel face?

East

300

 True or False: An if statement can run both the true and false branch

false

300

What happens to Karel 

if (frontIsClear()) {

  move();

} else {

  turnLeft();

}

if the front is clear. If yes, move. If not, turn left.

300

When does a for loop stop running?

When the loop has repeated the set number of times.

400

Why might Karel get stuck in an infinite loop?

If the condition never changes (always true).

400

Write the code to make Karel move forward, turn right, and put a ball.

move();

turnRight();

putBall();

400

 If Karel is standing on a corner with no balls, what happens if the code is:

if (ballsPresent()) {

 takeBall();

}

Nothing happens — Karel skips the takeBall(); command because the condition is false.

400

Why would you use an if/else statement instead of just an if statement?

Because it lets you choose between two actions instead of just checking one.

400

What happens to Karel?

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

  putBall();

  move();

}

makes Karel put down 3 balls, one per corner.

500

Double Challenge:

Challenge: Write a loop that makes Karel fill an entire row with beepers until the wall, but only in empty spaces.

if no_beepers_present():

    put_beeper()

500

What’s the difference between Karel and SuperKarel?

SuperKarel has extra commands like turnRight() and turnAround()

500

What happens to Karel in the following statement

if (frontIsBlocked()) {

  turnLeft();

}

Karel will only turn left if there is a wall in front. If the way is clear, Karel does nothing.

500

Bonus Question:

Karel is on a corner. The code says:

if (ballsPresent()) { 

 takeBall(); 
} else {  
move(); 
}



  • If there is a ball → Karel will take the ball.

  • If there is no ball → Karel will move forward.

500

What is the difference between repeating with a for loop vs. writing the same command multiple times?

A for loop is shorter, easier to read, and reusable