Karel (programming Language) - Principles

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). 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). 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.

Read more about this topic:  Karel (programming Language)

Famous quotes containing the word principles:

    Now there cannot be first principles for men, unless the Divinity has revealed them; all the rest—beginning, middle, and end—is nothing but dreams and smoke.
    Michel de Montaigne (1533–1592)

    Though the ancients were ignorant of the principles of Christianity there were in them the germs of its spirit.
    Herman Melville (1819–1891)

    With our principles we seek to rule our habits with an iron hand, or to justify, honor, scold, or conceal them:Mtwo men with identical principles are likely to be seeking fundamentally different things with them.
    Friedrich Nietzsche (1844–1900)