Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

A Bone on Every Tile

This time, there's a bone on every tile of the path. The dog has to do the same thing for each bone: walk onto it and pick it up. That's a pattern that belongs in a loop.

Inside a loop, the order of the blocks matters just as anywhere else. Try going through the first pass in your head:

  • If the loop has Move forward first and then Pick up bone, the dog steps onto the first bone and picks it up. The second pass takes it to the second bone, and so on.
  • If Pick up bone comes first, the dog tries to pick up a bone where it stands at the start. But there's none there.

Going through the first and the last pass of a loop in your head is a good habit. The beginning and the end of a loop are where bugs hide most often.

Instructions

  1. 1

    Pick up all six bones.

  2. 2

    Walk to the goal.

  3. 3

    Use at most 4 blocks.

Back

6/11

  1. 1. Repeating Moves
  2. 2. Loops
  3. 3. Stairs
  4. 4. After the Loop
  5. 5. Quiz: Pass by Pass
  6. 6. A Bone on Every Tile
  7. 7. Around the Flower Bed
  8. 8. A Loop in a Loop
  9. 9. A Bug in a Loop
  10. 10. Quiz: A Bug in a Nested Loop
  11. 11. Summary
Next

Try it yourself

Do this exercise right here in your browser. No account needed.