Syntax and Basics
Logic & Loops
Navigation & Design
100

You want Karel to turn left, but the command turnleft(); isn't working. What specific character needs to be changed?

The 'l' must be a capital L (turnLeft)

100

A function contains a while(noBallsPresent()) loop with a move(); command inside. What will Karel do?

Move until it is on a ball

100

Karel starts at (1, 1) facing East. She moves, turns left, puts a ball, turns left three times, moves, and turns left again. What is her final direction?

North

200

Which of these is a legally written command in Karel: move, move;, or move();?

move();

200

Karel is on 1 ball. A loop runs 3 times: if a ball is there, Karel takes it; otherwise, Karel puts down 2 balls. How many balls are left at the end?

1 ball (Take 1, put 2, take 1)

200

What is the name of the design process where you start with a massive problem and break it into tiny, solvable pieces?

Top down design

300

If you want to leave a note in your code for another human using just one line, what symbols do you start with?

// (Double forward slash)

300

In a program that cleans up a row of balls, why is there often a second if(ballsPresent()) statement after the main while loop?

To pick up a ball on the very last spot

300

Since Karel doesn't know turnRight(), we have to define it. What is the correct way to build that function using only turnLeft()?

Use three turnLeft(); commands

400

Which of these commands is not a condition you can use in an if statement: frontIsClear(), ballsPresent(), or turnLeft()?

turnLeft() (It's an action, not a true/false condition)

400

You see a script with 9 move(); commands in a row. What control structure should you use to make this code "cleaner"?

A For Loop

400

If you define the exact same function name twice in one program (like two versions of function go()), what happens?


An error because the function was defined twice