encyclopegia.org

Karel (programming language)

Karel is an educational programming language for beginners, created by Richard E.[src] Pattis in his book Karel The Robot: A Gentle Introduction to the Art of Programming.[src] Pattis used the language in his courses at Stanford University, California.[src] The language is named after Karel Čapek, a Czech writer who introduced the word robot in his play R.U.R.[src]

Karel is an educational programming language for beginners, created by Richard E.[src] Pattis in his book Karel The Robot: A Gentle Introduction to the Art of Programming.[src] Pattis used the language in his courses at Stanford University, California.[src] The language is named after Karel Čapek, a Czech writer who introduced the word robot in his play R.U.R.[src] ==Principles== A program in Karel is used to control a simple robot named Karel that lives in an environment consisting of a grid of streets (left-right) and avenues (up-down).[src] Karel understands five basic instructions: move (Karel moves by one square in the direction he is facing), turnLeft (Karel turns 90 ° left), putBeeper (Karel puts a beeper on the square he is standing at), pickBeeper (Karel lifts a beeper off the square he is standing at), and turnoff (Karel switches himself off, the program ends).[src] 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.[src] 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.[src] ===Example=== The following is a simple example of Karel syntax: BEGINNING-OF-PROGRAM   DEFINE turnRight AS BEGIN turnLeft; turnLeft; turnLeft; END   BEGINNING-OF-EXECUTION ITERATE 3 TIMES BEGIN turnRight; move END turnoff END-OF-EXECUTION   END-OF-PROGRAM ==Variants and descendants== The language has inspired the development of various clones and similar educational languages.[src] As the language is intended for beginners, localized variants exist in some languages, notably Czech (the programming language was quite popular in Czechoslovakia).[src] The principles of Karel were updated to the object-oriented programming paradigm in a new programming language called Karel++.[src] Karel++ is conceptually based on Karel, but uses a completely new syntax, similar to Java.[src] A REALbasic implementation, rbKarel, provides the basic Karel commands within an RBScript environment with BASIC syntax being used for loops and conditionals.[src] This teaching project provides a cross-platform GUI for Karel experiments including single-stepping and spoken output.[src] A Karel-inspired language and environment called Robot Emil uses a 3D view of the robot's world.[src] Robot Emil offers a large palette of objects that can be placed to depict walls, windows (transparency), water and grass.[src] The camera may be moved freely throughout the 3D environment.[src] The robot may be controlled interactively with buttons in the GUI, or by programs written in Emil's Karel-like programming language.[src] The author states that the program is free for use by schools, students and children.[src] Versions are available in English, Czech and Slovak.[src] A proprietary language which is also called Karel is used to program the robots of FANUC Robotics.[src] However, FANUC Karel is derived from Pascal.[src] The language has also been implemented as Karel the Dog in JavaScript by CodeHS.[src] Similar to the original language, this implementation features Karel in a grid world.[src] Programmers use and build upon Karel's simple vocabulary of commands to accomplish programming tasks.[src] Instead of putting and picking beepers, Karel the Dog puts and takes tennis balls.[src] A German version of Karel is named "Robot Karol".[src] ==External links== Karel syntax xKarel by R.[src] Dostal and P.[src] Abrahamczik (created 1997) Karel by T.[src] Mitchell (created 2000) Karel in tiny-c by Lee Bradley (created 2013) Karel for iPad by CloudMakers (created 2014) Karel in JavaScript by CodeHS Karel in Perl 5 by E.[src] Choroba (created 2016) Karel-3D in JavaScript and C++ (sk) (en) (de) (es) (created 2017, 2018) Guido van Robot (GvR) - Karel in Python (created 2006, 2010)[src]

36 sentences · 36 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Karel (programming language)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/karel-programming-language. Accessed 27 November 2026.

Chicago

"Karel (programming language)." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/karel-programming-language.

APA

encyclopegia.org. (2025). Karel (programming language). Retrieved November 27, 2026, from https://encyclopegia.org/wiki/karel-programming-language

Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

official language

stub · references available

pan-Slavic language

stub · references available

Hawaiʻi Sign Language

stub · references available

Taiwanese Sign Language

stub · references available

Category:Programming languages

stub · references available

International Mother Language Day

stub · references available

polysynthetic language

stub · references available

Category:Films by country or language

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1320362726 · 0.5 · snapshot enwiki-001320362726

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.