Please enable JavaScript to use CodeHS

CodeHS Glossary


Karel Documentation Java

You can find full documentation for all Karel commands and syntax in the DOCS tab. Here is a small section of the Karel Documentation:

Karel’s Built in Commands

move();
turnLeft();
putBall();
takeBall();

Methods

Writing a method is like teaching Karel a new word.

Naming methods: You can name a method whatever you want, but you can’t have spaces in the method name.

Remember that each open brace { must match with a closing brace }

private void turnRight()
{
    turnLeft();
    turnLeft();
    turnLeft();
}

private void turnAround()
{
    turnLeft();
    turnLeft();
}

private void yourMethodName()
{
  // Code that will run when you make a call to
  // this method.
}