Minecraft Education: Agent Operator

Loop Awakening

Stop repeating yourself. Put the place-and-move blocks inside a repeat loop and build ten blocks with one command.

Builder handle: ____________________   Date: ____________

Steps

  1. Grab a loop. From Loops drag 'repeat 4 times' into your build command and change 4 to 10. ☐
  2. Move the blocks inside. Put 'agent place forward' and 'agent move forward by 1' inside the loop. Order matters: place first, then move. ☐
  3. Run and count. Type build. Count the blocks. Ten blocks from one command is the whole point of a loop. ☐
  4. Go square. Wrap your repeat 10 loop in a 'repeat 4 times' loop and add 'agent turn left' after the inner loop. You just built the outline of a room. ☐

Cave Cleanup Crisis

Program the Agent to build the four walls of a 10 by 10 room using nested loops.

Finish line: A closed 10 × 10 outline built by one command.

What I built: ____________________________________________

One thing I fixed: _______________________________________

Check

  1. Your loop places 10 blocks but they all land in the same spot. What is missing?
    • ☐ A turn block
    • ☐ A move block inside the loop
    • ☐ A bigger number
    • ☐ A chat command
  2. A repeat 4 loop holds a repeat 10 loop. How many times does the inner code run in total?
    • ☐ 14
    • ☐ 10
    • ☐ 40
    • ☐ 4
  3. Why do programmers use loops?
    • ☐ To make code longer
    • ☐ To repeat steps without writing them again
    • ☐ To slow the game down
    • ☐ Because Minecraft needs them

Techie Factory · techiefactory.com