Welcome to CS

Section16.9Mixed Up Code Practice

Try to solve each of the following. Click the Check button to check each solution. You will be told if your solution is too short, has a block in the wrong order, or you are using the wrong block. Some of the problems have an extra block that isn’t needed in the correct solution.

Checkpoint16.9.1.

The following program segment should draw a red line. The blocks have been mixed up. Drag the blocks from the left and put them in the correct order on the right. Click the Check Me button to check your solution.

Checkpoint16.9.2.

The following program segment should draw an equilateral triangle. The blocks have been mixed up. Drag the blocks from the left and put them in the correct order on the right. Click the Check Me button to check your solution.

Checkpoint16.9.3.

The following program segment should create two turtles, Ari and Chris. Ari should have a pensize of 20 and draw a line to the west, while Chris will have the standard pensize and draw a line to the east. The blocks have been mixed up. Drag the blocks from the left and put them in the correct order on the right. Click the Check Me button to check your solution.
Note that we could do the ari commands either before or after the chris commands. Assume we want to move ari first.

Checkpoint16.9.4.

The following program segment should draw a red line, starting from the postion (10, 30). The blocks have been mixed up. Drag the blocks from the left and put them in the correct order on the right. Click the Check Me button to check your solution.

Checkpoint16.9.5.

The following program segment should turn turtle Bri south, then draw a green line. The blocks have been mixed up. Drag the blocks from the left and put them in the correct order on the right. Click the Check Me button to check your solution.