If Karel is facing North and the code

turnLeft();
turnLeft();
runs; which direction is Karel facing now?

North

South

East

West

1 answer

If Karel is initially facing North and executes the code turnLeft(); turnLeft();, he will turn 90 degrees to the left twice.

  1. The first turnLeft() will turn Karel from North to West.
  2. The second turnLeft() will turn Karel from West to South.

Therefore, after running the code, Karel is now facing South.