Units of Measurement

8-10 yrs old

Computer Science

Math & Economics

Using Code Connection students will solve problems involving units of measurement and conversion of units.

avatar Submitted By: John Miller

November 12, 2018


  • Project Based Learning

Supporting Files

World File

World file for student use.

Learning Objectives

  • Students will understand how to use block fill and builder raise wall commands.
  • Students will explore the use of agent commands
  • Students will choose the most appropriate command to complete a task.
  • Students will solve problems involving measurement and conversion of units. (CCSS.MATH.CONTENT.4.MD.A.1)

Guiding Ideas

  • Before beginning, students should be comfortable with moving their agent around and be able to locate block commands and builder commands found under the advanced tab.
  • The agent can be used to build columns and rows of blocks
  • Builder commands can be used to create large walls.
  • Block commands can be used to dig trenches and fill space with blocks.
  • Know relative sizes of measurement units within one system of units.
  • Within a single system of measurement, students can express measurements in a larger unit in terms of a smaller unit.

Student Activities

Teachers may choose to run this lesson with students working in pairs or individually. If working in pairs, students will join the same world while creating the code together in the host world. For less experienced students this lesson could be completed over multiple sessions.

Students are expected to complete four coding challenges designed to support their understanding of units of measurement. Before beginning they will need to create a conversion table for the following units:

  • Centimeters, meters, kilometers
  • Ounces, pounds
  • Seconds, minutes, hour
  • Inches, feet

Depending on experience and objectives, students can work toward solving each challenge sequentially, or in whatever order they choose. They should be encouraged to brainstorm, test, and share their successes and failures. There are multiple ways each challenge can be completed.

1. Convert inches to feet and build a column representing 12, 24, 36, and 48 inches. This can be accomplished by coding the agent to build a stack of pink concrete blocks next to the blocks representing 1, 2, 3, and 4 feet.

Students should orient their agent to face the intended direction, add pink concrete into the agent’s inventory and then use a combination of the following:

  • Agent [place on move] <true>
  • Agent move [forward] by (1 or 2)
  • Agent move [up] by (number of inches)

2. Build a structure to represent the number of centimeters in a meter. Students have several options here, but cannot build a single column 100 blocks tall. They should brainstorm possible configurations that would total 100. Possible commands to use include:

  • Blocks command fill with - they will need an understanding of relative position to build a cuboid.
  • Duplicate the agent command above and modify to create 4 stacks of 25 while optionally adding a loop.
  • Agent command to build horizontally with agent turning right or left and move up at the end of a rotation. A loop command would come in handy.

*Note – there is a visual comparison of 1 meter and 1 kilometer available for curious students to explore. At the end of the 1,000 block kilometer is an NPC that will teleport the player back to spawn.

3. One second and 60 seconds (minute) structures are pre-built and stand adjacent to the third challenge. Students should use Builder commands to build a wall 10 blocks tall and 36 blocks wide, then repeat the command 10 times.

Have students experiment on a small scale using the following commands before configuring the final code:

  • Builder place mark
  • Builder move [forward] by 36
  • Builder raise wall from mark with (concrete block of choice) of (10)

This will create a wall of 360 blocks. Add a repeat loop (10x) around these commands and a wall of 3,600 blocks will be generated.

4. The final challenge requires that students use the code of their choice to build a representation of 16 ounces next to a block representing 1 pound.

Performance Expectations

Students will demonstrate their understanding of agent commands by coding their agent to build columns and short towers.

They will duplicate and modify their code to suit a different purpose.

The fill with block command will be used to generate rows and columns

Students will generate several 3D representations of units of measurement based of comparison tables.

Students should be able to answer the following questions:

  • Which command was the easiest to use to create a tall column?
  • How did you use the fill with command?
  • What was the most difficult command to use? Why?
  • Which measurement comparison surprised you the most?


  • Project Based Learning

External References

Supporting Files

World File

World file for student use.