Grade 7 Matter & Energy
Lesson Summary: Students will create a playable click and drag game to classify matter
Curriculum Expectations: These expectations are intended to highlight the many ways in which this lesson could support
the curriculum. It is neither expected nor necessary for teachers to address all of these expectations at once. Teachers
are encouraged to select the most relevant expectations based on their unique context and intentions for the lesson.
Science & Technology
Mathematics
Language - Writing
Overall Expectations
A2. use coding in investigations and
to model concepts, and assess the
impact of coding and of emerging
technologies on everyday life and in
STEM related fields
A3. demonstrate an understanding of
the practical applications of science
and technology, and of contributions
to science and technology from
people with diverse lived experiences
C2. demonstrate an understanding of
the nature of matter, including the
properties of pure substances and
mixtures, and describe these
properties using particle theory
Specific Expectations
A2.1 write and execute code in
investigations and when modelling
concepts, with a focus on planning
and designing programs
A2.2 identify and describe impacts of
coding and of emerging technologies,
such as artificial intelligence systems,
on everyday life, including skilled
trades
A3.3 analyse contributions to science
and technology from various
communities
C2.2 use particle theory to distinguish
between pure substances and
mixtures
C2.3 distinguish between
homogenous and heterogenous
mixtures
C2.8 describe pure substances as
elements and compounds consisting
of atoms and combinations of atoms
Overall Expectations
C3. solve problems and create
computational representations of
mathematical situations using coding
concepts and skills
Specific Expectations
C3.1 solve problems and
create computational
representations of mathematical
situations by writing and executing
code, including code that
involves events influenced by a
defined count and/or subprogram
and other control structures.
C3.2 read and alter existing code,
including code that involves events
influenced by a defined count and/or
subprogram and other control
structures, and describe how changes
to the code affect the outcomes and
the efficiency of the code.
Overall Expectations
1. Generate, gather, and organize
ideas and information to write for an
intended purpose and audience
2. draft and revise their writing, using
a variety of informational, literary,
and graphic forms and stylistic
elements appropriate for the purpose
and audience;
Specific Expectations
1.1 identify the topic, purpose,
audience, and form for writing
1.2 generate ideas about a potential
topic, using a variety of strategies and
resources
1.3 gather information to support
ideas for writing in a variety of ways
and/or from a variety of sources
1.4 sort ideas and information for
their writing in a variety of ways
2.1 write short texts using a variety of
forms
2.3 use words and phrases that will
help convey their meaning as
specifically as possible
2.4 vary sentence structures and
maintain continuity by using joining
words (e.g., and, or) to combine
simple sentences and using words
that indicate time and sequence to
link sentences
3.4 use punctuation to help
communicate their intended
meaning, with a focus on the use of:
quotation marks to indicate direct
speech; commas to mark
grammatical boundaries within
sentences; capital letters and final
punctuation to mark the beginning
and end of sentences
3.8 produce pieces of published work
to meet identified criteria based on
the expectations related to content,
organization, style, use of
conventions, and use of presentation
strategies
Breaking Down the Coding Expectations in Science & Technology:
In the Grade 7 Science & Technology curriculum, there are two coding related expectations:
A2.1 write and execute code in investigations and when modelling concepts, with a focus on planning and
designing programs
A2.2 identify and describe impacts of coding and of emerging technologies, such as artificial intelligence
systems, on everyday life, including skilled trades
To paraphrase these expectations and express them in plainer language, students are being asked to:
Prior to writing any code, students should plan the structure and logic of how their code will work
show how coding impacts our lives
Both expectations will be addressed through the project.
Learning Goals: We are learning to write code to create click and drag game to teach others about the classification of
matter
Success Criteria:
1. I can effectively plan a program
2. I can use a variety of event blocks to control the flow of my program
3. I can use conditionals to evaluate a player’s response
4. I can collect and use input from the player to change the outcome of my program
5. I can use variables to store data, including input from the player
6. I can effectively classify matter related to pure substances and mixtures.
STEM Profile:
Have you ever taken a medicine when you weren’t feeling well? Pharmaceutical scientists are
people who research, develop, and test medical drugs. To do this, they need to have a strong
understanding of pure substances and mixtures!
Tu Youyou is a Chinese pharmaceutical chemist who used her skills to discover artemisinin
and dihydroartemisinin, both of which were breakthrough treatments for malaria, which kills
hundreds of thousands of people each year. Thanks to her discovery, millions of lives were
saved! For her work, Tu Youyou the Nobel Prize in Physiology or Medicine in 2015, making her
the first Chinese Nobel laureate in this area!
Like Tu Youyou, we will be helping others understand pure substances and mixtures so they
can better understand the world of matter around them
Minds On:
1. Students will have different experience levels when it comes to coding.
a) If students have never experienced coding before, please watch the “What is Coding?” video.
b) If students have experienced coding before, have a quick discussion in which students share their definition
of coding. Some responses to look for include:
i. Coding is the language that computers speak
ii. Coding is how we talk to computers or get computers to do what we want
iii. Coding is the instructions that we give to a computer
2. In small groups or as a whole class, brainstorm with students to generate ideas for between three and ten questions
they will ask in their quiz game about pure substances and mixtures. Some sample prompts include:
o What are the differences between pure substances and mixtures?
o What are different kinds of pure substances?
o What are different kinds of mixtures?
o What are the differences between elements and compounds?
Planning Our Project:
Introduce the idea of a flowchart, a type of diagram that shows the sequence of steps involved in performing an
algorithm, with specific symbols used to represent different control structures. The symbols used in a flowchart are:
Oval - used to show the beginning and end of the program
Parallelogram - used to represent input or output
Rectangle - used to show processing (i.e., calculating or
manipulating data)
Diamond - used to show decisions (i.e., conditionals)
Lines and arrows - used to connect the shapes to show the
direction of the steps and to represent loops
Text and labels - included with shapes, as necessary.
Since every student’s project will be different, so will the flowcharts that they
create and the tools or technologies from which they can choose to create
their flowcharts (i.e., pen and paper, dedicated apps and websites for
creating flowcharts). A sample flowchart has been provided below to give a
general sense of what the end product may look like.
Creating Our Project:
This sample code demonstrates how the project might work and please note that there is code included for each of the
sprites and the stage. Please note that in this project, a large portion of the code is not written in any individual sprite
but rather in the stage. This allows those scripts to apply to the project as a whole rather than any individual sprite. For
your reference, Scratch determines where to display sprites and controls movement using a Cartesian coordinate
system, with (0,0) being the center of the screen and it may be helpful to pre-teach this concept, if it is one with which
students are unfamiliar.
Part 1: Setting Up The Backdrops/Questions.
1. Create a series of backdrops using the paint editor, including one for the title slide (i.e., that may include the name
of the game and instructions about how to play), ending slide (i.e., that includes a congratulations message and lets
the player know that the game is over), as well as individual backdrops for each of the questions.
a. Keep the background of each backdrop neutral to avoid colour interference
b. For each of the question backdrops, add two solid squares in very different colours. These will serve as the
area to which players will click and drag their answers. Use the colour picker to ensure that the fill and
outline of each shape are the same shade. Position these squares on opposite sides of the backdrop. See
the sample code for examples.
c. Use the text tool to label the squares in each question (i.e., “pure substance” and “mixture”)
d. Be sure to name the backdrops clearly (i.e., “Title Screen”, “Question 1”, Question 2”).
Part 2: Title Screen & Start Button
1. In the stage, use the When Green Flag Clicked block and the Switch Backdrop To () block to ensure that, at the start
of the game, players always begin on the title slide.
2. Delete the default cat sprite and create a new sprite that will serve as the start button for the game. You can:
a. Use the “Choose a Sprite” and select one of the pre-designed button sprites available in Scratch
b. Upon adding the sprite, edit the costume of that sprite using the text tool to add a word or phrase like
“Start Game”
3. In the code for the start button, use the When Green Flag Clicked block and the Show block so that the button will
always appear at the start of the game.
4. Add the When This Sprite Clicked event block, the Switch Backdrop To () block, and the Hide block. Set the Switch
Backdrop To () block to match the name of your first question backdrop. This will make it so that clicking the start
button will cause the game to advance and the start button to disappear once the questions begin.
Part 3: Answer Option Sprites
1. Create as many new sprites as needed to represent the options to be sorted in each question. There should be two
items in each question. You can design your own sprites using the paint editor, upload your own sprites, or choose
from the predesigned sprites.
2. In all answer option sprites, add the When Green Flag Clicked block and the Hide block so that the sprites do not
immediately appear at the start of the game and can later be triggered to only appear at the appropriate question.
3. For each answer option sprite, use the When Backdrop Switches To () and set to the appropriate backdrop for that
question. Underneath, add:
a. The Show block so that the sprite will appear at the appropriate question.
b. The Set Drag Mode () block and assign to “draggable”. This will allow the player to be able to click and drag
the sprites without stopping the program entirely.
c. The Go To X () Y () block and set the coordinates to a starting position that is not on top of the coloured
squares.
4. For just one of the sprites in each pair (i.e., if the options for Question 1 are Salt and a Salad, then choose just Salt
or Salad), continue on with the sequence of code outlined in the previous step by adding the following:
a. Use the Wait Until () block and add a Key () Pressed? sensing block inside. Choose the desired keyboard
key (i.e., spacebar). This will allow users the time to click and drag the sprites to the correct position and
then press a key to trigger the game to “check” their answers.
b. Add two If () Then blocks one after the other. Add the Touching Colour ()? sensing block to each conditional
and click on the colour that is preloaded. Use the colour picker button to select the colour from the preview
screen rather than trying to manually set to the same colour.
c. Inside each If () Then block, add a Broadcast () block. For the conditional that matches the correct answer
(i.e., the correct answer is to drag that sprite to the blue box onscreen rather than to the red), set a relevant
message name like “CorrectQ1”. For the conditional that matches the incorrect answer, choose a message
name like “IncorrectQ2”. Be sure to name these messages clearly, as they will be very important in Part 4.
5. For each answer option sprite, add a When Backdrop Switches To () event block and set it to the backdrop that will
come next (i.e., if working on the sprites for question 1, then set to backdrop name for question 2). Add a Hide block
so that this sprite will disappear upon the question beginning.
Part 4: Evaluate Correct/Incorrect Response
1. Inside of the area for the stage, add the following code for the correct answer for each question:
a. Add the When I Receive () block and set to the relevant message for the correct answer for that question
(i.e., “Q1Correct)
b. Add the Ask () and Wait block. Inside the text bubble, add a message to the player to tell them they are
correct, as well as a keyword for how to advance (i.e., “Type ‘next’ to move on to the next question”).
c. Add an If () Then block and layer in the () = () operator block. Inside the first blank space, add the Answer
variable. In the second blank space, add whatever the keyword you chose in the previous step (i.e., “Next”).
This will make it so that the player can only move on once they have typed the keyword.
d. Inside the If () Then block, add the Switch Backdrop To () block and set to the next question backdrop.
2. Use same code as in the previous step for the incorrect answer for each question, but make two changes:
a. Change the message in the When I Receive () block to align with the message for the incorrect answer (i.e.,
“Q1Incorrect”).
b. Edit the response in the Ask () and Wait block to tell the player that they were incorrect.