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

Quiz: A Bug in a Nested Loop

The dog should walk around the flower bed and pick up all three bones. But the program stops with an error: the dog tries to pick up a bone where there's none. One block is wrong. Click it.

1repeat (3) {
2    repeat (3) {
3        moveForward();
4    }
5    pickUp();
6    turnRight();
7}
8
Back

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