Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Karel is an
educational programming language for beginners, created by Richard E.
Pattis in his book Karel The Robot: A Gentle Introduction to the Art of
Programming. Pattis used the language in his courses at Stanford
University. The language is named after Karel ¿apek, a Czech writer who
introduced the word robot. A program in Karel is used to control a
simple robot named Karel that lives in an environment consisting of a
grid of streets and avenues. Karel understands five basic instructions:
move, turnleft, putbeeper, pickbeeper, and turnoff. Karel can also
perform boolean queries about his immediate environment, asking whether
there is a beeper where he is standing, whether there are barriers next
to him, and about the direction he is facing. A programmer can create
additional instructions by defining them in terms of the five basic
instructions, and by using conditional control flow statements if and
while with environment queries, and by using the iterate construct.