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:

    The principles of the good society call for a concern with an order of being—which cannot be proved existentially to the sense organs—where it matters supremely that the human person is inviolable, that reason shall regulate the will, that truth shall prevail over error.
    Walter Lippmann (1889–1974)

    The chief lesson of the Depression should never be forgotten. Even our liberty-loving American people will sacrifice their freedom and their democratic principles if their security and their very lives are threatened by another breakdown of our free enterprise system. We can no more afford another general depression than we can afford another total war, if democracy is to survive.
    Agnes E. Meyer (1887–1970)

    The proclamation and repetition of first principles is a constant feature of life in our democracy. Active adherence to these principles, however, has always been considered un-American. We recipients of the boon of liberty have always been ready, when faced with discomfort, to discard any and all first principles of liberty, and, further, to indict those who do not freely join with us in happily arrogating those principles.
    David Mamet (b. 1947)