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

The Big Maze

The last challenge: two big mazes full of bones and an empty editor. Build the whole program yourself, without hints. If you get stuck, go back to the earlier exercises or ask the AI helper under the instructions.

When the dog reaches the goal, you'll have finished the whole course. Look at everything you can do:

  • An algorithm is an exact procedure, and a program is an algorithm written down for a computer. A computer does exactly what you tell it.
  • A program is carried out block by block, and the order matters. A big task is solved in smaller parts.
  • Bugs are part of programming. You find them by running the program and watching where it behaves differently from how it should (debugging).
  • A loop repeats blocks a given number of times, or while a condition is true. Watch out for endless loops.
  • The If … else block decides based on a condition. Conditions and loops can be put inside each other.
  • The not block turns a condition around (negation), so the dog can walk on until it finds a bone. Repeat until at the goal means "repeat while not at the goal".
  • A function is a block of your own: you define it once, give it a name and call it wherever you need it. The program gets shorter, and a bug in the function is fixed in one place.
  • A good program works on all inputs, not just one. The right-hand rule gets through every maze of this kind.

You'll find these ideas in every programming language. You'll just write code instead of blocks. In Python, a block program for this maze, with the function step from the Fetch First exercise, would look like this:

def step():
    turn_right()
    while not path_ahead():
        turn_left()
    move_forward()

while not at_goal():
    if bone_here():
        pick_up()
    step()

The word def defines the function, and while not at_goal(): is the Repeat until at the goal block. Looks familiar, doesn't it? You can go on with the Python or JavaScript course. You'll find the same loops, conditions and functions there, just written in words.

Instructions

  1. 1

    Pick up all the bones in both mazes.

  2. 2

    Walk to the goal.

Back

4/4

  1. 1. The Maze
  2. 2. Bones in the Maze
  3. 3. Fetch First
  4. 4. The Big Maze

Try it yourself

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