Grade 7 Earth & Space Systems
Lesson Summary: Students will create an interactive simulation that demonstrates the particle theory of 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
E2. demonstrate an understanding of
heat as a form of energy that is
associated with the movement of
particles and is essential for many
natural processes within Earth’s
systems
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
E2.1 use particle theory to explain
how heat affects the motion of
particles in a solid, a liquid, and a gas
E2.3 use particle theory to explain the
effects of heat on volume in solids,
liquids, and gases, including during
changes of states of matter
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 an interactive simulator that demonstrates the particle theory
of matter
Success Criteria:
1. I can effectively plan a program
2. I can use conditionals to create interactions between different sprites
3. I can collect and use input from the user to change the outcome of my program
4. I can use variables to store data, including input from the user
5. I can effectively simulate the behaviour of particles in solid, liquid, and gas states
STEM Profile:
Particle theory helps us understand the interaction between temperature and
states of matter. One great example of this is refrigeration! Refrigerators work by
extracting heat and using it to evaporate a refrigerant (which is a fluid that
undergoes a repeated phase transition from a liquid to a gas and back again) which
then creates a cooling effect.
Someone who used this knowledge to his advantage was Frederick McKinley Jones,
a Black American inventor who created mobile refrigeration technology! Our ability
to eat food from across the country (and even across the world!) is completely
dependent on this technology. Even more, the portable cooling units he designed
were especially important during World War II, as they were used to transport
blood, medicine, and food for use at army hospitals and on open battlefields. Throughout his career he received more
than 61 patents, 40 of which had to do with refrigeration technology.
Like Frederick, we will be exploring the particle theory of matter so we can better understand how it shapes the world
around us and can allow us to create amazing new inventions of our own!
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 their simulations that will show
how particles behave and interact in different states of matter. 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:
For this project, teachers may wish to assign a different state of matter to each student or group or to model the creation
of a simulation for one of the three states of matter and then invite students to create a simulation for one of the other
two states of matter of their choice. The sample code for solids, liquids and gases demonstrate how the project might
work for each of the three states of matter. 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.
Option 1: Gas
Part 1: Set Up
1. Create a relevant backdrop using the paint editor and add instructions to the backdrop using the text tool, if desired.
2. Add a sprite (i.e., the “ball” sprite can serve as a representation of the particles) and delete all the costumes for that
sprite except for one. Use the paint bucket in the paint editor to set it to a solid colour to make interactions between
each particle sprite easier to detect.
3. In the orange Variables menu, click “Make a Variable”.
a. Name the new variable “Temperature” and select the checkbox so that the variable appears on screen.
b. When the variable appears on the project preview screen, right click it and select Slider. This will allow the
user to change the temperature in order to eventually impact the speed at which the particle sprites move.
c. You can reposition the variable on screen by clicking and dragging.
Part 2: Basic Particle Settings
1. In the area for the particle sprite, add the When Green Flag Clicked event block.
2. Use the Set () To () block from the variables menu and change it to match with the name of your temperature
variable. Setting it to a low number (i.e., 10) will make it so that when your code begins. the particles will already
be in motion.
3. Use the Set Size To ()% block to resize the particle sprite (i.e., if using the default ball sprite from Scratch’s pre-
designed sprites, a size of 50%-75% works well).
Part 3: Interactions Between Particles
1. Add a Forever loop from the control menu. Inside of the forever loop add the If on Edge, Bounce block to keep
particles within the limits of the screen.
2. Still inside of the forever loop, add an If () Then block combined with a Touching Color ()? block from the sensing
menu. Click on the pre-loaded colour and use the colour picker to select the exact shade of the particle sprite you
have created to ensure 100% accuracy.
3. Inside of the If () Then block, add the following blocks, which will make it so that when two particles bump into each
other, they turn in opposite directions and bounce away, creating the effect of an interaction:
a. Add the Turn () Degrees block and combine it with a Pick Random () to () block. Set the numbers to be
between 150 210. The direction of the turn does not matter.
b. Add the Move () Steps block and set it to approximately 10. You can play around with the number to see
what impact that has on your code, but a lower number (i.e., anywhere from 5 to 15) will make the
movement more realistic.
Part 4: Respond to Temperature Changes
1. Outside of the If () Then block but still inside of the Forever loop from part 3, add a Move () Steps block and insert
a () / () operator block.
2. Set the first blank space of the () / () block to the round block with your temperature variable name from the
variables menu. Set the second blank space to a value such as 10. This will make it so that as the temperature
variable is increased or decreased with the slider, the movement of the particle sprites will speed up or slow down
accordingly.
Part 5: Create Many Particles
1. Each particle sprite will have the exact same code. As a result, you can just duplicate the sprite you have already
created in order to make as many particles as you desire. To create a duplicate, right click on the icon of the sprite
in the sprite pane and select “Duplicate.” Remember that if you make any changes in a particle sprite you will need
to replicate those changes in all the other sprites.
Option 2: Solid
Part 1: Set Up
1. Create a relevant backdrop using the paint editor and add instructions to the backdrop using the text tool, if desired.
2. Add a sprite (i.e., the “ball” sprite can serve as a representation of the particles) and delete all the costumes for that
sprite except for one. Use the paint bucket in the paint editor to set it to a solid colour to make interactions between
each particle sprite easier to detect.
3. Create two versions of this sprite with different colours so you can visually tell the difference and be sure to name
them clearly. For the remainder of this lesson, they will be referred to as the “red particle” and “black particle” (but
you can choose any colour).
4. In the orange Variables menu, click “Make a Variable”.
a. Name the new variable “Temperature” and select the checkbox so that the variable appears on screen.
b. When the variable appears on the project preview screen, right click it and select Slider. This will allow the
user to change the temperature in order to eventually impact the speed at which the particle sprites move.
c. You can reposition the variable on screen by clicking and dragging.
Part 2: Create the Container Sprite
1. Use the paint editor to design a sprite to be some kind of fully enclosed shape (i.e., a box). The shape should be an
outline only with no fill colour and the recommended pen size for the line thickness is approximately 10. No code
is needed in this sprite.
Part 3: Settings for Red Particle
1. In the area for the particle sprite, add the When Green Flag Clicked event block.
2. Use the Set () To () block from the variables menu and change it to match with the name of your temperature
variable. Setting it to a low number (i.e., 10) will make it so that when your code begins. the particles will already
be in motion.
3. Use the Set Size To ()% block to resize the particle sprite such that approximately 10 12 particles can fit within the
container sprite (i.e., if using the default ball sprite from Scratch’s pre-designed sprites, a size of 50%-75% works
well).
4. Use a Forever loop and add the following blocks inside to create the effect of the particles vibrating back and forth:
a. Add a Change X by () block combined with a () / () operator block and set the first blank space of th