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 history of the race, from infancy through its stages of barbarism, heathenism, civilization, and Christianity, is a process of suffering, as the lower principles of humanity are gradually subjected to the higher.
    Catherine E. Beecher (1800–1878)

    When great changes occur in history, when great principles are involved, as a rule the majority are wrong.
    Eugene V. Debs (1855–1926)

    His principles are like the bristles of a domesticated pig, they don’t pierce through the pork.
    Franz Grillparzer (1791–1872)