Minds On

Giving instructions

A teacher divides a class into groups of four students.

They then provide instructions for each group.

When they get to the first group, they announce that the three group members will provide the fourth with instructions for drawing a certain image, but they will not be able to see what the fourth person is drawing.

They then hand the group members Card 1 with the task.

Card 1 contains the “rules” for how they can give their instructions, along with the image:

Card 1 instructions

You will try to get the drawer to draw this 2D shape, but you cannot use the word “square.” You also cannot see what the drawer is drawing, until they think they’ve finished.

You also cannot use any words that might have the shape of a square, such as a window or floor tile, etc.

When the drawer is finished, get them to show you the image. Did the shape look like the intended image? If not, start again. Continue to check if the shape drawn is a square and start again if not.

Once they draw the square successfully, move on to Card 2.

A small square

Questions

  1. What kind of instructions might the group give the drawer?
  2. How many tries do you think it might take to draw the image correctly?

Record your ideas using a voice recorder, text-to-speech, or writing tool.

Card 2 instructions

Try to get the drawer to draw this 2D shape. Now that the drawer has drawn the square successfully, you can use the word square in your instructions, but you cannot use the following words: house, triangle, or rectangle.

Again, you can provide instructions, but cannot use any words that might have the same shape as a triangle, or rectangle (e.g., door). You also cannot see the drawer’s drawing.

A house with a triangle roof, a square base, a square window, and a rectangle door.

When they think they have finished, get the drawer to show how close they were to drawing this image.

Questions

  1. Would the challenge on Card 2 be more difficult, less difficult, or about the same level of difficulty after Card 1 has been completed successfully?
  2. What instructions might the group members give the drawer for drawing the shape on Card 2?
  3. Would it help if they can use the word square?

Record your ideas using a method of your choice.

Action

Subprogramming

There are many times in life that we complete certain tasks multiple times throughout a day or week.

For example, we might brush our teeth 2-3 times per day, or make our bed each morning.

In music, there might be a scale or song we play on an instrument.

In a dance routine, we might have a certain sequence of movements that we use more than once.

Often, in dance, the sequence of movements may have a name, so that we don’t have to list each of the individual movements that are part of the sequence each time we do that sequence of steps again.

In coding, programmers might write a small set of instructions as one smaller task, and then combine this with other sets of instructions to make one larger program.

We call this a “subprogram.”

Subprogram:

A small set of instructions for completing one small task. Subprograms can be combined in a main program to accomplish a large task using small steps.

In the Minds On section, the group members provided the drawer with the instructions for drawing a square in Card 1.

They could then use this set of instructions for the square for the Card 2 challenge.

By defining “square,” the group created something like a subprogram.

The group members would likely find it easier for the Card 2 challenge to get the drawer to draw the bottom of the house and the window, since the drawer knew how to draw a square from the Card 1 challenge.

The instructions for drawing the house could be split into separate subprograms. Perhaps the subprograms would be named square, triangle, and rectangle, using the word “square” twice – once for the bottom of the house, and once for the window.

Let’s explore a Scratch application that draws the following:

  • a triangle with a side length of 25 in quadrant 1
  • a square with a side length of 25 in quadrant 2
  • a triangle with a side length of 50 in quadrant 3
  • a square with a side length of 50 in quadrant 4

Press Scratch(Opens in a new window) to explore the following code.

There are 18 blocks. The first event block indicates that when the green flag is clicked, the code runs. The next block erases everything, then the pen is up. The sprite goes to (100, 100). The pen is put down. A square with side lengths of 25 is drawn. The pen is picked up. The sprite goes to (-100, 100). The pen is put down. A triangle is drawn with side lengths of 25. The pen is picked up. The sprite goes to (x,y)- coordinates are blank. The pen is put down. A triangle with side lengths of (blank) is drawn. The side length is blank. The pen is picked up. The sprite goes to (x, y)- coordinates are blank. The pen is put down. A square with side lengths of (blank) is drawn. The side length is blank.

Run the code by clicking on the green flag.

Two of the shapes are missing – the triangle in quadrant 3, and the square in quadrant 4.

Your task is to fill in the missing values in the code in order to:

  • draw a triangle with a side length of 50 in quadrant 3
  • draw a square with a side length of 50 in quadrant 4

Here are some steps to help if you get stuck:

  1. Determine the x, y values needed to start the drawing of the triangle in quadrant 3:

    A block with directions to go to coordinates x and y. The value of x and y are blank.

  2. Enter the side length to make the triangle required for quadrant 3:

    There is a block with Triangle and a blank space for the side length

  3. Determine the x,y values needed to start the drawing of the square in quadrant 4:

    A block with directions to go to coordinates x and y. The value of x and y are blank.

  4. Enter the side length to make the square for quadrant 4: There is a block with Square and a blank space for the side length

Did you get the code working to draw the shapes in each quadrant? If not, try again!

Did the shapes look how you expected them to in quadrant 3 and 4? Why or why not?

What kind of transformation have you coded? How do you know?

Record your response using a method of your choice.

Consolidation

Building a house

Let’s try to create the image found on Card 2 in the Minds On section. Some code is already written for you. Press Scratch(Opens in a new window) to access the code. Click the green flag at the top to run the code!

You will notice the top of our house is missing!

Your task is to write the code for the triangle subprogram.

Press ‘Hint’ to reveal a hint about what to do.

Hint: You might check out the code for a triangle in the application from Action.

The following image displays the final output:

A grid with a house drawn on it. The scale of the x axis is from minus 240 to 240. The scale of the y axis is from minus 180 to 180. The y axis and x axis intersect through the middle of the house. The house has a square base, a triangle roof, a square window, and a rectangle door.

Did your subprogram draw the triangle where you expected?

If not, what did you have to change?

How might you alter your final code to have the house only in one quadrant?

Record your response using a method of your choice.

Reflection

As you read the following descriptions, select the one that best describes your current understanding of the learning in this activity. Press the corresponding button once you have made your choice.

I feel...

Now, expand on your ideas by recording your thoughts using a voice recorder, speech-to-text, or writing tool.

When you review your notes on this learning activity later, reflect on whether you would select a different description based on your further review of the material in this learning activity.