Scratch Jr
Beginner
30 mins
Teacher led
What you need:
iPad/Tablet

Ready, Set, Go! The Great Frog vs. Pig Race

In this lesson, you will guide your students through programming a race between a frog and a pig using Scratch Jr. You'll start with a discussion about animal movements, then move on to setting the scene and introducing the characters. The students will learn about parallel coding and variable speeds, making the race more dynamic and realistic. For those who finish early, there's an extra challenge of adding a third character to the race.
Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - How animals move!

    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.

    2 - Setting the Scene

    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.


    3 - Introducing the Contenders

    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.


    4 - Hopping Mad!

    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:

    • First, have them drag the green flag block into the coding area.
    • Then, show them how to create the first sequence of blocks that tells the frog to move forward.
    • Next, right below that sequence, have them create a second sequence starting with another green flag block that tells the frog to jump.

    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.


    5 - Variable speeds

    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.

    • Drag the green flag block into the coding area to begin the sequence for the pig.
    • Add the movement blocks that will make the pig move forward.
    • Introduce the variable speed block. This block allows them to adjust the speed of the pig’s movements. By placing the speed block into the sequence, they can slow down the pig to make the race more realistic.
    • Guide the students to set the speed to a slower setting.

    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!


    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more