Karel Level 1

Level 1


Help Karel the robot clean up her world!


Tell your robot how to complete this level by writing commands. Commands go in the Robot tab inside the commands method

void commands() {
  // put your robot instructions here!!!

Here's a list of the commands you can use.

Move the robot forward one square in her current direction.
A wall must not be directly in front of the robot when moving.
Turn the robot left 90 degrees.
Tell the robot to pick up a beeper from the world.
A beeper must exist at the robot's current position.
Tell the robot to put down a beeper at her current position.
The robot must have beepers in her beeper bag.
Stop running commands and print the results.


You may want to speed up the world to see if later parts of your solution work correctly. You can make your robot move faster by opening the Level_1 tab and changing line 8:


The number in between the parentheses is the time in milliseconds to wait before moving on to the next command. Lower numbers mean faster robots.


This is what it should look like when you have successfully completed the level.


When you turnOff your robot, it will print information to the console. Compare yours to a typical solution below. If you used a lot more moves or turns, re-think the problem and try to create a more efficient solution.

Moves 67
Turns 28
Puts 4
Picks 4