Start the lesson by engaging the students in a brief discussion about how different animals move. Ask questions like, "How do you think a rabbit moves? What about a turtle?" Encourage the students to share their ideas, leading them to recognize that different animals have unique ways of moving—rabbits are quick and jump, turtles are slow and steady, frogs hop, and so on.
Guide the discussion to the conclusion that because animals move differently in real life, they will also move differently in the race they’re about to program. Explain that in today’s lesson, they’ll be programming a race between two animals, and they’ll need to consider these differences in movement when setting up their race.
This discussion sets the stage for understanding why they’ll be using the speed block to adjust how fast each animal moves, making the race more realistic and fun.
Before the students start programming their race, it’s important to set the scene with the right background. Guide the students to explore the different background options available in Scratch Jr. and encourage them to think about where a race might take place.
Explain that the background they choose will help make the race feel more exciting and realistic. For example, a grassy field or a race track might be a great choice for a race between a rabbit and a turtle. Encourage the students to select the background that best fits their race scenario.
Once they’ve chosen their background, they’ll be ready to start programming the race, with the scene perfectly set to match the action.
Now that the background is set, it’s time for the students to pick their race characters. Explain that in today’s lesson, they’ll be using two characters with very different speeds—a frog and an pig.
Guide the students to open the character library in Scratch Jr. and find the frog and pig sprites. Explain that the frog is quick and nimble, perfect for fast movements, while the pig is slower and more deliberate in its steps.
Encourage the students to think about how these differences will affect the race. Once they’ve selected the frog and elephant, they’ll be ready to start programming their race, with each character bringing its unique style of movement to the challenge.
In this part of the lesson, we’ll introduce the concept of parallel coding, where two pieces of code run simultaneously. This is a powerful tool that allows students to make their characters perform multiple actions at the same time.
Explain to the students that today, they’re going to make the frog do something really cool—jump while moving forward at the same time. To do this, they’ll need to create two separate sequences of code for the frog: one for the jumping action and one for moving forward.
Guide them through the process of setting up parallel code:
Explain that when they press the green flag to start the race, both sequences of code will run at the same time, making the frog jump as it moves forward. This simultaneous action will make the frog’s movement more dynamic and interesting in the race. Encourage students to experiment with different combinations of parallel code to see what other cool effects they can create.
Next, it’s time to code the elephant and introduce the concept of the variable speed block. Explain to the students that, unlike the frog, the pig moves much more slowly. To make sure the characters don’t move at the same pace during the race, they’ll need to use the speed block to control how fast or slow the pig moves.
Once the speed is set, encourage the students to test their code by pressing the green flag. They should see the frog jumping forward normally while the elephant moves slowly, reflecting the natural differences in their speeds.
Ask your students to use the same speed block but set to 'quick' for the frog!