This appendix defines the structure of the Karel programming language on a single page.
move();
turnLeft();
putBeeper();
pickBeeper();
/* Comments can be included in any part
* of a program. They start with a slash-star
* and end with a star-slash.
*/public class name extends SuperKarel {
public void run() {
code to execute
}
declarations of private methods
}
frontIsClear()beepersPresent()beepersInBag()leftIsClear()rightIsClear()facingNorth()facingSouth()facingEast()facingWest()frontIsBlocked()
noBeepersPresent()noBeepersInBag()leftIsBlocked()rightIsBlocked()notFacingNorth()notFacingSouth()notFacingEast()notFacingWest()if(condition){
code run if condition passes}
if(condition){
code block for "yes"} else {
code block for "no"}
for(int i = 0; i < count; i++){
code to repeat}
while(condition){
code to repeat}
private voidname() {
code in the body of the method.}
turnRight();
turnAround();
random(p);
paintCorner(color);