Turning

Congratulations on your first program! So far, though, the dog can only walk straight. Two new blocks change its direction:

  • Turn left ↺ turns the dog a quarter turn to the left,
  • Turn right ↻ turns it a quarter turn to the right.

The dog turns on the spot: a turn block doesn't move it anywhere, it only changes the direction the dog is facing. Only the next Move forward moves it, in the new direction. So to go around a corner, you need two blocks: turn, then move forward.

Left and right are from the dog's point of view, not yours. As long as the dog faces away from you (up the screen), its left and right are the same as yours, so you don't have to worry about it yet. You'll see what happens when the dog faces another way in the next exercise.

Before you start building, look at the map and count the tiles: how many steps the dog has to take before it turns, and how many after.

Instructions

Get the dog to the goal: go up to the end of the path, turn right and walk to the goal.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

2/7