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

After the Loop

What happens to the blocks that are under a loop, not inside it? They're carried out once, when the loop ends, that is, after all its passes. The program

  • Repeat 3 times
    • Move forward
  • Turn left ↺

takes three steps forward and then turns left once.

So when you build, watch where you drop a block. When you drag a block to a loop, you'll see where it will go: inside the loop (into its mouth), or under it. If a block ends up in the wrong place, drag it again.

A program can have more than one loop, even one under another. Each loop has its own number of passes.

Instructions

  1. 1

    Get the dog to the goal: up to the end of the path, left, and on to the goal.

  2. 2

    Use at most 5 blocks: two loops and one turn.

Back

4/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.