Collecting Bones

There are bones lying on the path, and the dog would love to collect them. The new Pick up bone block does that.

The dog only picks up a bone it's standing on. If it just walks over a tile with a bone, the bone stays there: the computer only does what you tell it, and you didn't ask it to pick the bone up. And if you put Pick up bone where there's no bone, the program stops with an error.

So the order of the blocks matters. The Pick up bone block has to come while the dog stands on the bone: after the Move forward that brought it there, and before the block that takes it away again.

This exercise has two instructions. The program has to do both at once: pick up all the bones and end at the goal.

Instructions

Pick up both bones.

Then 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:

6/7