Wick's Block Isle · Lesson 3

Lay a Floor

Fill a whole area with two for loops

Watch

A loop inside a loop lays a wooden floor 2 rows by 4 planks.

for row in range(2):
    for col in range(4):
        place("plank")
        move("right")
    move("down")
    move("left", 4)

Guess

The same code. It pauses after the first row: predict, then check.

Change

The floor must fill the dotted area: 3 rows. Change one number.

Make

Lay a 3 × 3 floor on the dotted blocks. The code you have lays one row.

for col in range(3):
    place("plank")
    move("right")