# Problem of the Week Problem B and Solution Shelby’s Code

## Problem

Shelby is using block coding to draw different shapes.

1. Her first program is shown. What shape will be drawn after running this program?

2. Using the given blocks, write a program to draw the same shape as Shelby’s program, using fewer blocks. Notice that some blocks contain an empty box to be filled with a number.

Blocks for part b.

Start of program for part b.

3. Using the given blocks, write a program to draw the following shape:

You may use a block more than once.

Blocks for part c.

Start of program for part c.

## Solution

1. This program will draw a square. The table below shows the drawing progress and position of the pen as we trace through the program.

Program Section Drawing Progress
2. By using the repeat block, we can use fewer blocks in the program, as shown.

3. There are several possible programs, depending on where the pen starts, and how many repeat blocks are used. Two programs are shown.