Grade 8 Life Systems
Lesson Summary: Students will create an interactive simulation that demonstrates the process of diffusion within a cell
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
B2. demonstrate an understanding of
the basic structure and function of
plant and animal cells and cell
processes
Specific Expectations
A2.1 write and execute code in
investigations and when modelling
concepts, with a focus on automating
large systems in action
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
B2.1 demonstrate an understanding
of cells, using cell theory
B2.4 explain the processes of
diffusion and osmosis within a cell
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 the analysis of
data in order to inform and
communicate decisions
C3.2 read and alter existing code
involving the analysis of data in order
to inform and communicate
decisions, 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 8 Science & Technology curriculum, there are 2 coding related expectations:
A2.1 write and execute code in investigations and when modelling concepts, with a focus on automating large
systems in action
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:
write code to demonstrate a science-related concept, focusing on writing code that includes elements of
automation
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 simulation that demonstrates the process of
diffusion within a cell
Success Criteria:
1. I can use conditionals to respond to data in my code
2. I can use sensing blocks to automate responses in my code
3. I can use random values to simulate real world unpredictability
4. I can represent the behaviour of molecules in a cell
STEM Profile:
What does it mean to study cells? Well, that is exactly what a molecular biologist does!
Molecular biology is the study of activity in and between cells, which helps us better
understand biological processes as a whole!
Carolyn W. Greider is a molecular biologist who won the 2009 Nobel prize for Physiology or
Medicine for her discovery of the enzyme telomerase, which has to do with how our
chromosomes are protected and has even led to interesting research in disease prevention,
including cancer. She is currently a Distinguished Professor in the department of molecular,
cell, and developmental biology at the University of California, Santa Cruz.
Like Carolyn, we will be diving deeper into the behaviour of cells by exploring the specific
process of diffusion. Let’s get started!
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 and key concepts that should be
represented in their simulation. Some sample prompts include:
o What is osmosis/diffusion?
o How do molecules behave when interacting with each other in a cell?
o Is the behaviour of molecules with a cell predictable or unpredictable? Why/in what ways?
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:
The sample code demonstrate how the project might work and please note that the sprites representing the molecules
are exact duplicates, so the code is the same for each. 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: Create the Membrane
1. Create a custom background using the Paint Editor to serve as the cell membrane. Using the rectangle tool or line
tool create a series of horizontal “dashes” precisely along the x-axis. There is a small symbol in the center of the
paint editor workspace that will help you line up your dashes. The gaps between each “dash” should be just large
enough that the molecule sprites will be able to fit through.
Part 2: Create the First Molecule
1. Create a sprite that is just a solid-coloured circle. You may wish to use the pre-designed Ball sprite already available
in Scratch and just change the costume to be a solid colour using the paint bucket tool.
2. Add a When Green Flag Clicked block and a Go To X () Y () block. Use a Pick Random () to () block in both the blank
spaces for the X and Y coordinates.
a. For the X value, set the parameters from -230 to 230. Since the coordinates required for the molecules to
stay on screen are -240 and 240, this provides a “buffer” to keep the molecules from starting right at the
edge of the screen. When more molecules are added, the random starting position will ensure that they
all start at different points on screen
b. For the Y value, set the parameters to -20 to -230. Assuming your membrane sprite from Part 1 was lined
up exactly along the x axis, the -20 will ensure that the molecules all start below the membrane. The value
of -230 provides a “buffer” from the edge of the screen and if you wish to have the molecules start at the
top of the screen, change these values to 20 and 230.
3. Add a Point in Direction () block. Use a Pick Random () block inside and set the parameters from 0 to 360. This will
randomly set the “heading” of each molecule so that the simulation begins with all of the molecules bouncing off
in different directions.
4. Add a Forever block and all blocks in the following steps will be inside of this block.
5. Add a Move () Steps block and set it to approximately 5. Increasing or decreasing this value will change the speed
at which the molecules appear to move.
6. Add the If On Edge, Bounce block to ensure that all molecule sprites stay on screen.
Part 3: Creating Interactions Between Molecules and the Membrane
1. Add an If () Then conditional block inside of the Forever block from Part 2, Step 6. Use a () or () operation block to
begin to set the condition that is being evaluated, which is to detect whether the molecule sprite is touching another
molecule sprite or the cell membrane to create a “bounce” effect.
a. In the first blank space of the () or (), add a Touching Color ()? block. It is very important that the exact
colour is correct (your eyes may not be able to tell subtle differences between colours, but your computer
can!), so use the color dropper to select the exact shade of the membrane.
b. In the second blank space of the () or (), add another Touching Color ()? block. This time, use the color
dropper to select the exact shade of the molecule sprite you created.
2. Inside of the If () Then conditional from the previous step, add a Turn () Degrees (the direction of the turn is not
important) and add a Pick Random () to () to the blank space. Set the parameters to 150 to 210.
a. This will make it so that when a molecule sprite touches either the membrane or another molecule sprite,
it turns in the other direction and creates the effect of “bouncing” away. Randomizing the direction (+ or
30 from a full 180 degree turn) will just make the behaviour a bit more unpredictable.
3. Still inside of the If () Then conditional from Step 2, add a Move () Steps block. Set it to approximately 5. This will
limit the likelihood of a molecule sprite getting “stuck” to another sprite or to the membrane.
Part 4: Create Many Molecule Sprites
1. Each molecule sprite will have the exact same code so the sprites that you have already created can just be
duplicated to make as many molecules as you like. To create a duplicate, right click on the icon of the sprite in the
sprite pane and select “Duplicate.”
a. Remember that if you make any changes in a molecule sprite you will need to replicate those changes in
all the other sprites.
Extensions
Turn the simulator into an osmosis simulator. Add additional molecules of a different colour and position them
to start on the other side of the membrane.
Add a variable to represent the temperature. Change it to a sliding variable to add the option for the user to
change the temperature. The number used in the Move () Steps block will need to be changed to be relative to
the temperature value (i.e., Move (Temperature/5) steps)
Consider adding sound effects to the interactions between molecules and the membrane. Students can use the
pre-loaded sounds in Scratch or use the Sound Editor to record their own sounds. The Start Sound () and Play
Sound () Until Done blocks will allow students to insert those files into their code.
To learn more about Carolyn Greider and about osmosis and diffusion, consider the following books and videos:
o Interview with Carol Greider on winning the 2009 Nobel Prize in Physiology or Medicine from Johns
Hopkins Medicine
o Carol Greider's Scientific Method from Big Think
o Transport in Cells: Diffusion and Osmosis | Cells | Biology | FuseSchool from FuseSchool Global
Education
o Diffusion from the Amoeba Sisters
Sharing Our Work/Consolidation: Students can share Scratch projects using these steps.
1. Students should be provided with time to share their projects with others and to engage in self and peer
assessment. This can be done in a variety of different formats, including a gallery walk, whole class presentation, or
“trading” their project with another student. Students can provide feedback in a variety of ways, including written
and verbal. A variety of feedback options and templates are available in Appendix A.
2. An important aspect of assessing student understanding is focusing on the process, not the product. While it is
important to have a final product that functions as intended, students are often asked to produce something within
a limited time frame; therefore, it may be the case that, given more time, a student would be able to produce a
fully functional product.
To assess learning, teachers can conference with students throughout the creation of their projects using the
anecdotal prompts in Appendix B and documenting these discussions using an anecdotal observations chart.
Teachers are encouraged to consider the troubleshooting strategies used by students throughout the project, their
ability to explain how their project works, and what they might do differently in the future.
3. A rubric can be used to evaluate the final product. This and other assessment and evaluation tools can be modified,
as needed.
Low -Tech/No-Tech Modifications:
While it is ideal to have one device per student, this is not the reality for many classrooms. If you are planning to
have students work in groups, consider a maximum group size of 2 students to ensure as much “hands-on” time
with coding as possible. If access to devices is limited, you may wish to implement this lesson as part of a station
rotation within your classroom or use another strategy to work with small groups.
If you have no access to devices, you can:
o print images of the Scratch blocks in the folder at this link, cut them out and have students create their
code with paper blocks instead.
o You may also wish to print out images of the background scenes and characters to further support students
Appendix A: Self and Peer Feedback
Student Self Assessment
o Thumbs Up
o WIN
Peer Assessment
o Two Stars and a Wish
o TAG
Appendix B: Anecdotal Prompts
Throughout the time when students are creating their projects, teachers are encouraged to circulate and conference
with students to discuss their projects and progress. The process is just as, if not more, important than the final product
when it comes to coding, so this is key to truly understanding a student's understanding.
Key Concepts
Students should be able to identify, name, and explain key coding concepts in their own words; for example, sequence
can be described as “the order in which you write your code matters”. Conditionals can be described as “if-then
statements that give your computer options to choose from.” The wording may be unique to each student, but they
should be able to explain the concept.
Suggested Prompts:
1. Can you tell me what you know about ______?
2. Can you show me where in your code you used _____? How does it work?
Application
There may be times when students “stumble” into the “right” answer in their code without fully understanding how
they got there, while another student may have a project that isn’t working the way they intend, but they know exactly
why and are able to very clearly articulate the steps they would take to fix the issue, if they had more time. Just because
a student’s project is not working exactly as they want it does not necessarily mean that they don’t understand so it is
important to take the time to discuss with students.
Suggested Prompts:
1. Can you tell me what this section of your code does?
2. It seems like this section of code isn’t working the way you want it to. Why do you think that might be? How
might you fix it?
3. What would happen if you made _____ change?
Troubleshooting/Debugging
In the world of code, a lot of mistakes are going to be made. Not only is this completely normal (and it happens to
professional computer programmers all the time), but it is actually HOW we learn to code. To move from making the
mistake into learning from it, students need to develop and utilize effective troubleshooting strategies. If a student just
sits there staring at their code for a week trying to figure out an issue without ever asking for help, they are not
demonstrating effective troubleshooting strategies. Effective troubleshooting strategies that students may demonstrate
include:
Reading their code out loud to themselves to attempt to identify errors
Sharing their code with a peer to ask for help in identifying an error
Dealing with frustration by taking a break from their code
Searching the web for answers to their questions
Suggested Prompts:
1. Can you tell me about a time where your code wasn’t working the way you wanted it to? What did you do to
fix it?
2. It seems like this section of code isn’t working the way you want it to. Why do you think that might be? How
might you fix it?
3. What are some mistakes you made when creating your project? What would you do differently next time?