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:

    It is always easier to fight for one’s principles than to live up to them.
    Alfred Adler (1870–1937)

    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)

    It is not impossible, of course, after such an administration as Roosevelt’s and after the change in method that I could not but adapt in view of my different way of looking at things, that questions should arise as to whether I should go back on the principles of the Roosevelt administration.... I have a government of limited power under a Constitution, and we have got to work out our problems on the basis of law. Now, if that is reactionary, then I am a reactionary.
    William Howard Taft (1857–1930)