skip to main content

Summary

In this lesson, students will learn basic coding in Scratch, focusing on using sprites, backdrops and problem solving.

Curriculum codes

Digital Technologies: AC9TDI4P02 AC9TDI6P02

Design and Technologies: AC9TDE4P02 AC9TDE6P02

Mathematics (Number / Algebra): AC9M3N07 ACM4N09 AC9M5N010 AC9M6A03

General capabilities

Numeracy: Positioning and location

Numeracy: Measurement

Digital Literacy: Generating

a young boy sitting and playing with handheld gaming device

Learning intention

In this lesson, you will learn basic coding in Scratch. You will begin to use sprites and backdrops and use a worksheet to solve coding problems and understand different coding concepts.

Prerequisites

It is recommended that lessons 1 to 5 are completed prior to this lesson. 

What you need

  1.  One device per team 
  2. Make one copy per student of the Programming worksheet
  3. Your Simple Scratch Project 
  4. Example games used in lesson 2 
  5.  Game Design Document (GDD)

Before the lesson

  1. Prepare a copy of the Programming worksheet for each student.
  2. Load your example games (e.g. Maze / Cat and Mouse games used in lesson 2) to demonstrate the coding blocks.
  3. To familiarise yourself with basic Scratch code blocks, you need to create a simple Scratch project to demonstrate the basic code blocks in a simple way for your students. To do this follow these instructions:
    • Create a free Scratch account (if you haven’t already).
    • Select ‘create’ to create a new project.
    • Simply drag code blocks from the left column into the main area in the middle. Make sure you choose at least one code blocks from each of motion, looks, sound, events and controls.

Teacher tip: All projects must start with an ‘event’, such as 'when clicked':

  • Use Scratch assets throughout your project or create your own.
  • Hit the green flag to test your project and play around to make something fun!
  • Select 'See Project Page' to view your project without the code blocks showing.
  • Save your Simple Scratch Project.

Activities

Introduction (25 mins)

  1. Introduce the concept of coding.
    • Has anyone heard of coding before? Can you tell me what you think it means?
    • Coding is like giving a computer a set of instructions to follow. Can anyone think of a time when you've followed instructions to do something?
    • Imagine you're teaching a robot to do a dance. What steps would you tell it to follow? That's what coding is like!
    • Has anyone heard of programming before?
    • Programming includes coding as well as designing, testing and fixing (known as ‘debugging’).
  2. Choose a student to be a robot. Ask the class to ‘program’ the robot to walk safely to the classroom door, avoiding any hazards like tables. e.g. Move forward 4 steps, turn 90 degrees right.
  3. Explain that they will be using Scratch to create and manipulate the sprites and backdrops they made in previous lessons.
  4. Show your Simple Scratch Project.
    • Select ‘See Project Page’ to hide the code blocks.
    • Run the game (select the green flag to run).
    • Discuss what the students observe happening when the game runs.
      • What do you see happening on the screen?
      • Describe what the sprites are doing in this project?
      • What type of coding do you expect to see on the inside of the project?
  5. Run your Simple Scratch Project again.
    • Show the code blocks by selecting ‘See inside’.
    • Explain the basic coding blocks used (e.g. Move 10 steps, turn 90 degrees).
    • Discuss the colours for the different coding blocks (i.e. motion, looks, sound, events and controls. You may have also used sensing, operators, variables).
      • What do each of these types of block do?
      • How are the colours helpful when you’re coding?
  6. Discuss the specific blocks within your Simple Scratch Project, ensuring you cover all of the code types and what they do in your project.
    • Let’s start by looking at the motion blocks.
    • What motion code blocks can you see?
    • What do you expect them to do?
  7. Distribute the Programming worksheet and ask teams to complete Part 1 by identifying the different coding blocks.

Teacher tip: Encourage teams to use the Scratch platform to find answers.

Main Activity (30 mins)

  1. Display the example games used in lesson 2 (e.g. example Maze game/ example Cat and Mouse game).
  2. Explain that blocks of code are combined in a specific order to create a sequence of steps (called an algorithm) that the computer follows to perform a task.
    • Remember how we coded our student robot to get to the classroom door?
    • We had to give instructions in the right order for him/her/they to get to the door safely.
  3. Explore the algorithm used in your example game. Point out key coding blocks within the algorithm such as motion, events and controls.
  4. Discuss, as a class, the functionality of each of the code blocks and how they contribute to the gameplay.
    • Let’s look at the code step-by-step. First, the game starts with an event block, 'when green flag clicked'. What does this block do?
    • Next, there is a motion block, 'move 10 steps'. Why do you think we use this block here?
    • Then there is a looks block, 'say Hello for 2 seconds'. How does this make the project more interactive?
  5. Tell students to complete Part 2 of the Programming worksheet.

    Teacher tip: They should recreate the code on the sheet in Scratch to determine the result of the code.

  6. Tell students to create their own simple program when they have completed Part 2 of the Programming worksheet.
    • Let’s create a simple project where our sprite moves, changes colour, and then makes a sound. (You might like to write these steps on the board).
    • Arrange the blocks in the right sequence to make this happen.
  7. When a few groups have made simple programs, encourage them to make some changes.
    • Try changing the order of your blocks. What changes do you see in your project?
    • Add some additional code blocks.
    • Test your code frequently!

Reflection/Sharing Tasks (5 mins)

  1. Discuss the result of the algorithm from the Programming worksheet.
    • Was the result what you expected? Why or why not?
    • What do you think would happen if we mixed up the order of the code blocks?
    • Why is it important to have the right sequence of steps in a program?
    • What was something interesting you were able to make your sprite do?

Teacher tip: Emphasise the importance of using the worksheet as a reference for future coding projects and completing the GDD throughout their STEM VGC journey.

Additional resources

https://resources.scratch.mit.edu/www/cards/en/scratch-cards-all.pdf Downloadable and printable coding cards for step-by-step instructions for a variety of projects. Great for putting on the tables during design and coding lessons.