Minds On
Compubot

It’s time to play a game! You will now access Compubot.
You can play levels 1 to 3. Practice writing code to make the Compubot move, turn and do other things!
What did you like about Compubot? What did you find easy? What did you find challenging?
Action
Altering code
- ScratchJr offers a coding experience similar to the one in Compubot.
- In both, the arrows represent movement forward.
- In ScratchJr there are also blocks for backward, up and down.
Below are 2 screen captures of a sequence of code to move the lizard to the shady tree and a sequence to move Scratch, the cat, to the tree.
The lizard is at (2,3). The cat is at (2, 8). The tree is at (15, 8).
What do you notice about the two sequences?
To run the sequences in Scratch Jr., you would touch the sprite or character.
Lizard’s sequence:

This is a screenshot of the ScratchJr program showing a sequence of code. There is a 15 x 20 grid with three objects on it: a cat, a lizard, and a tree. The lizard is at (2, 3). The cat is at (2, 8). The tree is at (15, 8) on the grid. The sequence of the lizard’s path to the tree is shown below the grid. There are fifteen blocks attached in a horizontal row. From left to right: The first block is the lizard’s starting position. Blocks 2 through 14 each show an arrow pointing to the right with the number “1” below the block. Block 15 shows an arrow pointing up with the number “5” shown below the block.
We can alter (change) the code for Lizard to get to the tree in fewer moves.
This will make it more efficient.
Instead of moving 1 space to the right thirteen times, we could make the lizard move just once all thirteen spaces to the right.
We would change the number under the move right block to 13.
We would only need one move right block.
This is what the new code would look like.
Lizard’s altered sequence:

This is a screenshot of the ScratchJr program showing a sequence of code. There is a 15 x 20 grid with three objects on it: a cat, a lizard, and a tree. The lizard is at (2, 3). The cat is at (2, 8). The tree is at (15, 8) on the grid. The altered sequence of the lizard’s path to the tree is shown below the grid. There are 3 blocks attached in a horizontal row. From left to right: The first block is the lizard’s starting position. The next block shows an arrow pointing to the right with the number “13” below the block. The last block shows an arrow pointing up with the number “5” shown below the block.
Your Turn
Scratch’s sequence

This is a screenshot of the ScratchJr program showing a sequence of code. There is a 15 x 20 grid with three objects on it: a cat, a lizard, and a tree. The lizard is at (2, 3). The cat is at (2, 8). The tree is at (15, 8) on the grid. The sequence of the cat’s path to the tree is shown below the grid. There are 8 blocks attached in a horizontal row. From left to right: The first block is the cat’s starting position. The next 6 blocks each show an arrow pointing to the right with the number “2” below the block. The last block shows an arrow pointing to the right with the number “1” shown below the block.
Try to alter(change) the code for Scratch to make it more efficient.
Can you change it so he gets to the tree in less moves?
What change or changes would you make to the code?
How did you know what to change?
Record your new sequence digitally, orally or in print.
Consolidation
Instructions
Duck and Frog need to get to the pond in ScratchJr.
Duck is at (3, 5). Frog is at (18, 13). The pond is at (12, 7).
Alter (change) the sequences.
Record your new sequences digitally, orally or in print.
Why did you alter the sequences as you did?
What was your desired outcome? What were you hoping would happen?
Note: If you were to touch(start) characters to begin the code at the same time, the events would be considered “concurrent.”
Duck’s sequence

This is a screenshot of the ScratchJr program showing a sequence of code. There is a 15 x 20 grid with three objects on it: a duck, a frog, and a pond. The duck is at (3, 5), the frog is at (18, 13), and the pond is at (12, 7) on the grid. The sequence of the duck’s path to the pond is shown below the grid. There are 6 blocks attached in a horizontal row. From left to right: The first block is the duck’s starting position. The next 3 blocks each show an arrow pointing to the right with the number “3” below the block. The last 2 blocks show an arrow pointing up with the number “1” shown below the block.
Frog’s Sequence

This is a screenshot of the ScratchJr program showing a sequence of code. There is a 15 x 20 grid with three objects on it: a duck, a frog, and a pond. The duck is at (3, 5), the frog is at (18, 13), and the pond is at (12, 7) on the grid. The sequence of the frog’s path to the pond is shown below the grid. There are 7 blocks attached in a horizontal row. From left to right: The first block is the frog’s starting position. The next 3 blocks each show an arrow pointing down with the number “2” below the block. The last 3 blocks show an arrow pointing to the left with the number “2” shown below the block.
Press ‘Discover More’ to extend your skills.
Discover MoreStudents who are familiar with ScratchJr may wish to try this code in the program and then make their alterations.
Reflection
How do you feel about what you have learned in this activity? Which of the next 4 sentences best matches how you are feeling about your learning? Press the button that is beside this sentence.
I feel...
Now, record your ideas about your feelings using a voice recorder, speech-to-text, or writing tool.