Scratch
Intermediate
60 mins
Teacher/Student led
190 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Red v Green v Blue

Embark on a fun coding journey with Scratch. Start by creating a new project, then design red, green, and blue dot sprites. Develop a 'count' variable and clone your dot 100 times. Make your clones appear randomly, move around, and 'infect' each other based on their colour. Finally, brainstorm ways to enhance your project.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

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 - Create a new Scratch project

    Create a new Scratch project and delete the cat sprite

    2 - Create a red dot sprite

    Create a new sprite by clicking on the paintbrush, this will open up the sprite editor. To draw draw a red circle, follow these steps:

    1. Choose a red colour in the Fill tool
    2. Turn off the Outline tool
    3. Select the Circle tool
    4. Draw a small circle in the middle of the editor (hold down the shift key while you draw it to make it a perfect circle)
    5. Name this costume 'red'


    If for some reason you can't create the red dot sprite, you can just use this starter project which already has the backdrop added to it. https://scratch.mit.edu/projects/780048995

    3 - Create the green and blue costumes

    We now need to create two more costumes for this sprite, a green circle and a blue circle.

    Duplicate the red costume twice and then use the paint bucket tool to change the colour to blue and green.

    Don't forget to name the costumes 'blue' and 'green'!


    4 - Create a 'count' variable

    Now that we've created our sprite, let's start coding!

    We're going to code 100 dots to appear so we need a variable to let us count to 100. Using the Variables toolbox create a 'count' variable.

    Add the following code to your sprite to start 'count' at 0.

    when green flag clicked set [count v] to [0]

    5 - Create 100 clones of the dot

    Next we'll code the dot sprite to be cloned 100 times. We'll use a repeat until block and also the 'count' variable to do this. Each time we clone the sprite we'll add 1 to the 'count' variable. When the 'count' variable is greater than 99 then we'll have created 100 clones.

    Add the following code underneath the code from the previous step:

    when green flag clicked set [count v] to [0] // insert the new code below this hide repeat until <(count) > [99]> wait [0.1] secs create clone of (myself v) change [count v] by [1]

    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 Coding Ireland. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more