Karel++ - Example

Example

An example of a Karel++ program when robot is located on (1, 2), facing east and holding 0 beepers (This code is intended to be placed within task{}):

ur_Robot Karel(1, 2, East, 0); Karel.move; Karel.move; Karel.pickBeeper; Karel.move; Karel.turnLeft; Karel.move; Karel.move; Karel.putBeeper; Karel.move; Karel.turnOff;

Read more about this topic:  Karel++

Famous quotes containing the word example:

    Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.
    Marcel Proust (1871–1922)