Karel's Programming Language

How can I write a simple Karel program?

The following simple program can actually be run by Karel: BEGINNING-OF-PROGRAM BEGINNING-OF-EXECUTION turnoff END-OF-EXECUTION END-OF-PROGRAM See if you can type this program into the editor window and get him to execute it. He won't do much of course, except turn himself off.

What simple things can Karel do?

Karel can move, turnleft, pickbeeper, putbeeper, and turnoff. Each of these words is a primitive instruction that can appear in a Karel program.

How can I get Karel to do more than one thing in a program?

Karel can carry out a sequence of instructions if they are written down in sequence. Thus, the following program will get Karel to move once, turn left, then turn off: BEGINNING-OF-PROGRAM BEGINNING-OF-EXECUTION move turnleft turnoff END-OF-EXECUTION END-OF-PROGRAM

Extending Karel's Vocabulary


This document is copyright 1994 by Joseph N. Wilson.
$Id$