Minds On

Move the robotic bug

In the previous Learning Activity, we used a Robotic Bug (RB1) to draw various shapes on a grid by using code to control its movements. The bug has a pen that draws along the pathway the robotic bug moves.

The following are instructions the robotic bug knows:

The robotic bug also understands what ‘repeat’ means.

Let’s examine the following line of code.

Repeat 4 [Fwd 6, LT]

Your task is to predict what path the robotic bug will draw, based off the code we just examined. Complete the Your Robotic Bug Grid Activity to show the bug’s path in your notebook or using the following fillable and printable document. You can also use a method of your choice to explain your prediction.

Your Robotic Bug Grid

Press the Activity button to access the Your Robotic Bug Grid.

Activity(Opens in a new tab)

Press the ‘Reveal’ button to check your answer.

 8 by 8 grid. Bug starts in top left square. Bug facing south. Shows bug moving 6 south, 6 east, 6 north, 6 west.

Were you correct? Explain what you think went wrong if you were not.

Action

Concurrent code

There is a second Robotic Bug. It is called RB2!

RB1 is placed in the original starting position and RB2 is placed on the opposite end, as shown in the grid below.

An 8 by 8 grid. BD1 is in the top left square. BD2 is in the top right square.

The following code is entered into the Robotic Bugs:

RB1’s code RB2’s code

Repeat 2 [Fwd 2, LT], Repeat 3 [Fwd 2, RT]

Repeat 2 [Fwd 2, RT], Repeat 3 [Fwd 2, LT]

The start button is pressed on both robotic bugs at the same time. This will run the robotic bugs’ code concurrently (at the same time).

What will the drawing look like? Complete the Two Robotic Bugs Grid Activity in your notebook or using the following fillable and printable document to help find both bugs’ paths. You can also complete this Activity using a method of your choice to explain your prediction.

Two Robotic Bugs Grid

Press the Activity button to access the Two Robotic Bugs Grid.

Activity(Opens in a new tab)

Let’s find out what the bugs drew as they ran the code concurrently! Press ‘Reveal’ to check your work.

 Learning Facing

8 by 8 grid. Bug 1 starts in top left square. Bug 2 starts in the top right square. Bug 1 facing south. Shows bug 1 moving 2 south, 2 east, 2 north, 2 west, 2 south. Bug 2 facing south. Shows bug 2 moving 2 south, 2 west, 2 north, 2 east, 2 south.

Create your own!

Now it’s your turn to create your own code for RB1 and RB2. Complete the Creating Code Grid Activity in your notebook or using the following fillable and printable document. You can also complete this activity using a method of your choice.

Creating Code Grid

Press the Activity button to access the Creating Code Grid.

Activity(Opens in a new tab)

Consolidation

Match the code

Match the drawing below to the correct code. Justify your thinking. RB1 is on the left. RB2 is on the right. Record your thoughts using a method of your choice.

Their starting positions are the same as their ending positions as shown in the following grid:

8 by 8 grid. Bug 1 starts in bottom left square. Bug 2 in the bottom right. Bug 1 facing east. Shows bug 1 moving 3 east, 5 north, 3 west, 5 south. Bug 2 facing west. Shows bug 2 moving 3 west, 5 north, 3 east, 5 south.


A)

RB1’s code RB2’s code

Repeat 2 [Fwd 3, LT Fwd 5, LT]

Repeat 2 [Fwd 3, RT, Fwd 5, RT]

B)

RB1’s code RB2’s code

Repeat 4 [Fwd 3, LT, Fwd 5, LT]

Repeat 4 [Fwd 3, RT, Fwd 5, RT]

C)

RB1’s code RB2’s code

Repeat 2 [Fwd 3, RT, Fwd 5, LT]

Repeat 2 [Fwd 3, RT, Fwd 5, LT]

D)

RB1’s code RB2’s code

Repeat 2 [Fwd 5, RT, Fwd 3, LT]

Repeat 2 [Fwd 5, RT, Fwd 3, LT]

Reflection

As you read through these descriptions, which sentence best describes how you are feeling about your understanding of this learning activity? Press the button that is beside this sentence.

I feel...

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