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:

    I have ever deemed it fundamental for the United States never to take active part in the quarrels of Europe. Their political interests are entirely distinct from ours. Their mutual jealousies, their balance of power, their complicated alliances, their forms and principles of government, are all foreign to us. They are nations of eternal war.
    Thomas Jefferson (1743–1826)

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

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