Express Course 2021
Express Course 2021
Learn computer science by trying the lessons below at your own pace! Learn to create computer
programs, develop problem-solving skills, and work through fun challenges! Make games and creative
Active section:
Sequencing
In this skill-building lesson, students will develop sequential algorithms to move a bird
from one side of a maze to the pig on the other side. To do this, they will stack code blocks
together in a linear sequence, making them move straight, turn left, or turn right.
2 3 4 5 6 7
8 Challenge
9 Practice
10 Prediction
11 Practice
12-13 Challenge
12 13
In this skill-building lesson, students will encounter pre-written code that contains mistakes.
They will need to step through the existing code to identify errors.
1 Video: Debugging with Scrat
2 3 4 5 6 7
8 Challenge
9 Prediction
10 Practice
algorithms and debugging. With a new character, Laurel the Adventurer, students will
create sequential algorithms to get Laurel to pick up treasure as she walks along a path.
2 3 4 5 6 7
8 Challenge
9-11 Practice
9 10 11
12 Prediction
13 Practice
In this skill-building lesson, students will take control of the Artist to complete drawings on
the screen.
2 3 4 5 6 7
8 Challenge
9 Practice
10 Prediction
Sprites
Students will program a simple animated underwater scene in this skill-building lesson.
2 Prediction
3 4 5
7-8 Practice
7 8
9 Free Play
In this skill-building lesson, students will work through a series of programming levels on
the computer, finishing with an open-ended “free play ” task where they can build
whatever they like. Students will write programs and learn about the two concepts at the
3 4 5 6 7
8-11 Practice
8 9 10 11
Events
In this skill-building lesson, students will work through a series of programming levels on
the computer, finishing with an open-ended “free play ” task where they can build
whatever they like. Students will write programs that respond to timed events and user
input.
1 Prediction
3 4 5 6 7
8-13 Practice
8 9 10 11 12 13
mini-project lesson. Students will use Sprite Lab's "Costumes" tool to customize their pet's
appearance. They will then use events, behaviors, and other concepts they have learned to
1 Exploration
2 3 4 5 6
7 Free Play
2 Practice
4-5 Events
4 5
7-9 Measures
7 8 9
11-13 Properties
11 12 13
Loops
This skill-building lesson has students using loops to help the Star Wars character BB-8
2 Practice
3 Prediction
5 6 7 8 9
10 Challenge
11-12 Practice
11 12
13 Prediction
14 Practice
This mini-project lesson builds on the understanding of loops. Students will create unique
1 2 3 4 5 6 7 8
9 Free Play
In this skill-building lesson, students will learn how to program a loop inside of another
loop.
1-2 Practice
1 2
4 Prediction
5-9 Practice
5 6 7 8 9
10 Challenge
11-12 Practice
11 12
13 Prediction
This mini-project lesson takes students through a series of exercises to create snowflake
1 2 3 4
5-6 Practice
5 6
Conditionals
This skill-building lesson gives students the chance to practice concepts that they have
learned up to this point and get their first experience with conditionals!
1 2 3 4 5 6 7 8 9 10
11-13 Challenge
11 12 13
14 Free Play
In this skill-building lesson, your class will continue to code with conditionals, allowing them
to write code that functions differently depending on the specific conditions the program
encounters.
2 Prediction
3 4 5 6 7
9 Skill Building
10 Prediction
11 Challenge
12-13 Practice
12 13
In this skill-building lesson, students will be working to fill holes and dig dirt in Farmer, but
they will not know the size of the holes or the height of the mounds of dirt. To solve these
1 2 3
5 Prediction
6 7 8 9
10 Challenge
11-12 Practice
11 12
13 Prediction
In this context-setting lesson, students will get the chance to practice content that they
2 3 4
6 7 8
10 11 12 13 14
16 Free Play
In this skill-building lesson, students will learn about until loops. Students will build
programs that have the main character repeat actions until they reach their desired
stopping point.
1 Skill Building
3 Prediction
4 5 6 7 8
9 Challenge
10 Practice
11 Prediction
Lesson 19: Harvesting with Conditionals
Students will practice while loops, until loops, and if / else statements. All of these blocks
use conditionals. By practicing all three, students will learn to write complex and flexible
code.
2 3 4 5
6-7 Practice
6 7
8 Challenge
9-10 Practice
9 10
11 Prediction
Functions
In this skill-building lesson, students will begin to understand how functions can be helpful!
2 3
5 6 7 8 9
11 12 13 14
16 Free Play
In this skill-building lesson, students will use functions with the Artist.
1 Prediction
2-9 Practice
2 3 4 5 6 7 8 9
10 Challenge
11 Practice
12 Prediction
13 Free Play
In this skill-building lesson, students will use conditionals with functions to harvest crops in
Harvester.
1-6 Practice
1 2 3 4 5 6
8-10 Practice
8 9 10
11 Challenge
12 Practice
13 Prediction
Variables
In this skill-building lesson, students will get practice with variables in Sprite Lab.
1 Prediction
3 4 5 6 7 8
9-15 Practice
9 10 11 12 13 14 15
In this skill-building lesson, students will explore the creation of repetitive designs using
variables in the Artist environment. Students will learn how variables make code easier to
write and easier to read. After guided puzzles, students will end in a free play level to show
3 4 5 6
7 Free Play
This skill-building lesson will help illustrate how variables can make programs more
1 2 3 4 5 6 7
8-10 Practice
8 9 10
For Loops
This skill-building lesson focuses on for loops and using an incrementing variable to solve
1-2 Review
1 2
6 7 8
9-13 Practice
9 10 11 12 13
In this skill-building lesson, students practice “for” loops with Artist. Students will complete
2 Exploration
3 4 5 6 7
8 Free Play
This project lesson takes students through the process of designing, developing, and
1 Example Projects
38 minutes
Overview Objectives
In this skill-building lesson, students will develop Students will be able to:
sequential algorithms to move a bird from one side of a
Identify and locate bugs in a
maze to the pig on the other side. To do this, they will
them move straight, turn left, or turn right. Translate movements into a series
of commands.
Purpose
Preparation
In this lesson, students will develop programming skills on
a computer platform. The block-based format of these Play through the puzzles to find
puzzles help students learn about sequence and
any potential problem areas for
concepts, without having to worry about perfecting
your class.
syntax.
(Optional) Pick a couple of
your class.
Full Course Alignment
Standards Make sure every student has a
reflection journal.
CSTA K-12 Computer Science Standards (2017)
Links
Agenda
Heads Up! Please make a copy of
a task.
problems in an algorithm or
program.
Warm Up (3 minutes)
Introduction
Model: Pull up Puzzle 5 to do in front of the class. While working through this puzzle with the class,
remind students that making mistakes is okay and remind them that the only way to be successful is to
be persistent. Discuss what to do when a program doesn't work (debug it!) or how to get through the
Next, you'll need to describe how the blocks in the workspace move the bird toward the pig. Show
students how to drag blocks from the toolbox and connect them beneath the when run block, but
Discuss: Think about how we would get the bird to the pig using arrows. How do we use these blocks
instead?
Have students use their fingers to point the direction that the bird should go next. Once you feel like
you have a classroom consensus, try to get students to put into words which block will make that action
happen. Roll your mouse over different options and have them shout "Yes" or "No".
Drag blocks into place one at a time, then click "Run" after each one. This will not only let them see how
far the bird has gone, but set good habits for when they start working to solve their own puzzles.
Continue this pattern, fixing bugs as they arise, until the bird successfully gets to the pig.
Additional Demonstration
We've included some multiple choice prediction levels. These could be used after finishing the Warm
Up.
Prediction Levels:
Programming in Maze #1
Programming in Maze #2
Transition: Now that students have seen an online puzzle in practice, they should be ready to start
solving puzzles of their own. Continue to the lab or bring out their classroom computers.
Teaching Tip
Some students may struggle with turning their bird in the correct direction, particularly when the
bird isn't facing up. Remind students that when we say turn left or right, we're giving directions from
Show the students the right way to help classmates by: Don't sit in their chair Don't use their
keyboard Don't touch their mouse Make sure the classmate can describe the solution before you
walk away
2 3 4 5 6 7
8 Challenge
9 Practice
10 Prediction
11 Practice
12-13 Challenge
12 13
Circulate: Teachers play a vital role in computer science education and supporting a collaborative and
vibrant classroom environment. During online activities, the role of the teacher is primarily one of
encouragement and support. Online lessons are meant to be student-centered, so teachers should
avoid stepping in when students get stuck. Some ideas on how to do this are:
Unanswered questions can be escalated to a nearby group, who might already know the solution.
Have students describe the problem that they ’re seeing. What is it supposed to do? What does it
Remind frustrated students that frustration is a step on the path to learning, and that persistence
If a student is still stuck after all of this, ask leading questions to get the student to spot an error on
their own.
Discuss: After providing students with end-of-class warnings, grab everyone's attention and get them
Wrap Up (5 minutes)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today. When completed, this can be used as a review sheet for
Prompts:
Draw an activity you like to do that you struggled with the first time. Draw or describe how you got
better.
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
In small groups, let students design their own mazes and challenge each other to write programs to
solve them. For added fun, make life-size mazes with students as the pig and bird.
Cross-Curricular Opportunity
Bugs, Bugs & More Bugs is an optional activity aligned to Common Core ELA and Math standards,
written by our teacher community. Students will practice debugging as they fix code, correct a math
Standards Addressed:
CCSS.ELA-LITERACY.L.2.1.B: Form and use frequently occurring irregular plural nouns (e.g., feet,
possessives.
hundreds, tens, and ones digits, using >, =, and < symbols to record the results of comparisons.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 2: Debugging in Maze
50 minutes
Overview Objectives
In this skill-building lesson, students will encounter pre- Students will be able to:
written code that contains mistakes. They will need to
Modify an existing program to
step through the existing code to identify errors.
solve errors.
in an age-appropriate way.
Students in your class might become frustrated with this
Links
Agenda
Heads Up! Please make a copy of
Vocabulary
Wrap Up (5 minutes)
Vocabulary
Reflection
problems in an algorithm or
program.
Teaching Guide
Warm Up (15 minutes)
Introduction
Ask students to think about problems they have to solve in everyday life.
The puzzles in this unit have already been solved for you (yay!), but they don't seem to be working
(boo!)
We call the problems in these programs "bugs," and it will be your job to "debug" them.
Vocabulary
Not giving up. Persistence works best when you try things many different ways, many different times.
Say: Debugging is a process. First, you must recognize that there is an error in your program. You then
work through the program step by step to find the error. Try the first step, did it work? Then the second,
how about now? If you make sure that everything is working line by line, then when you get to the place
that your code isn't doing what it's supposed to, you know that you've found a bug. Once you've
discovered your bug, you can work to fix (or "debug") it!
If you think it will build excitement in the class you can introduce the character of today's puzzles, Scrat
from Ice Age. If students aren't familiar with Scrat, show some clips of the quirky squirrel running into
trouble.
Before letting the students start on the computer, remind them of the advantages of *Pair-
Programming-video and asking their peers for help. Sit students in pairs and recommend they ask at
As mentioned in the purpose of this lesson, make sure the students are aware that they will face
frustrating puzzles. Tell them it is okay to feel frustrated, but it is important to work through the problem
and ask for help. As the students work through the puzzles, walk around to make sure no student is
2 3 4 5 6 7
8 Challenge
9 Prediction
10 Practice
Wrap Up (5 minutes)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Draw a bug you encountered in one of the puzzles today. What did you do to "debug" the
program?
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
Planting bugs
Have students go back through previous levels, purposefully adding bugs to their solutions. They can
then ask other students to debug their work. This can also be done with paper puzzles.
When other students are debugging, make sure that the criticisms are constructive. If this could be a
problem for your class, go over respectful debugging before this activity by role playing with another
student.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 3: Collecting Treasure with
Laurel
50 minutes
Overview Objectives
In this skill-building lesson, students will continue to Students will be able to:
develop their understanding of algorithms and
Develop problem solving and
debugging. With a new character, Laurel the Adventurer,
students will create sequential algorithms to get Laurel to critical thinking skills by reviewing
computer program.
In this lesson, students will be practicing their
students widen their scope of experience with Make sure every student has a
CSTA K-12 Computer Science Standards (2017) Heads Up! Please make a copy of
with students.
creating a program.
Teaching Guide
Warm Up (5 minutes)
Introduction
This lesson uses most of the same blocks from the previous lessons and adds the ability to collect . Tell
the students that this block will allow Laurel the Adventurer to pick up the treasure that she is standing
over. This new block will be discussed more in the bridging activity.
Pull a puzzle from the corresponding online stage. We recommend puzzle 7. Have students discuss a
pattern that they think will get Laurel the Adventurer to collect all the treasure. Ask the students to
share. See how many other students had the same answer!
Laurel the Adventurer is looking to collect as much treasure as she can. Instruct the students to traverse
the puzzle to collect whatever they can. Some levels will require you to only pick up one piece of
treasure, but others will require you to pick up every piece of treasure. Pay attention to the instructions
2 3 4 5 6 7
8 Challenge
9-11 Practice
9 10 11
12 Prediction
13 Practice
Wrap Up (5 minutes)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Draw a maze that you might solve with the blocks you used today.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 4: Creating Art with Code
50 minutes
Overview Objectives
In this skill-building lesson, students will take control of Students will be able to:
the Artist to complete drawings on the screen.
Break complex shapes into simple
parts.
goals. In this case, students learn more about pixels and Play through the puzzles to find
angles using the new blocks, while still practicing their
any potential problem areas for
sequencing skills. Also, students will be able to visualize
your class.
new goals such as coding the Artist to draw a square.
(Optional) Obtain protractors for
each student.
AP - Algorithms & Programming
Links
Agenda
with students.
Main Activity (30 minutes)
Make a Copy
Cross-Curricular Opportunity
Teaching Guide
Introduction
Show the students one or both of the following videos as an introduction to angles:
Use *Student Handout to show the students interior versus exterior angles for different shapes. This
document can be used as a hand out or you can choose to print it out as a poster for students to refer
to.
Tell the students that in these puzzles they will be moving a character who leaves a line everywhere he
goes. The students will be writing code that gets the character to draw various shapes, including a
square.
In this set of puzzles, the artist will no longer be constrained to 90 degree angles. Having physical
protractors available can help students better visualize the angles they need. Otherwise, the stage
provides images of the angles as the student selects which angle to use. (Please note: Angle choices are
limited to two inside of the dropdown menu, reducing the number of options students have to work
through.)
Before sending the students to the computers to work on the puzzles, it might be beneficial to give a
brief presentation of how to use the tools in this level. We recommend puzzle 5 as a good puzzle to
2 3 4 5 6 7
8 Challenge
Teaching Tip
The eighth puzzle asks the students to draw a 6 sided polygon. This might be challenging for some
students. We recommend getting the students to try a few times, ask a peer, then ask the teacher
for help. Below is an image that might be helpful for the students.
9 Practice
10 Prediction
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What are the interior angles that make up a square. What about for a triangle?
Sketch a simple shape on your paper and imagine the code used to draw it. Can you write that
Extended Learning
Use this activity to enhance student learning. It can be used as an outside of class activity or other
enrichment.
On the second sheet draw instructions for recreating that image commands to move straight and
Trade instruction sheets and attempt to recreate the image using only the provided instructions.
Cross-Curricular Opportunity
Shapes & Landscapes is an optional activity aligned to Common Core ELA, Common Core Math and
Next Generation Science Standards, written by our teacher community. Students are asked to design a
dam to prevent future flooding. Using code, you will create a blueprint to show the local town council
Standards Addressed:
meters.
NGSS.2-ESS2-1: Compare multiple solutions designed to slow or prevent wind or water from
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 5: Swimming Fish in Sprite Lab
45 minutes
Overview Objectives
Students will program a simple animated underwater Students will be able to:
scene in this skill-building lesson.
Create new sprites and assign
your class.
Full Course Alignment
Standards Make sure every student has a
Reflection Journal.
CSTA K-12 Computer Science Standards (2017)
Links
Agenda
Heads Up! Please make a copy of
Vocabulary
told to stop.
appearance.
Teaching Guide
Warm Up (10 minutes)
Introduction
Today students will learn how to work with sprites in Sprite Lab.
Display: Pull up a previous puzzle from Code.org, ideally one containing a "main character" like Scrat
Discuss: Let the students know that this character on the screen is a sprite. It is a graphic that is
controlled by a program. In this lesson, students will have the opportunity to choose their own sprites to
control.
This demonstration and discussion can help students move into the Sprite Lab environment.
Using a projector, show the sandbox level to your students. The goal is to show them some of the
unique ways that Sprite Lab works. Model writing a few programs and ask students to share their
observations.
What would happen if we told the sprite to begin two behaviors at once?
If we want the sprite to stop a behavior when we click it, how might we do that?
Before heading into the Main Activity, introduce or review today's lesson vocabulary.
Content Corner
Sprite Lab works differently in some ways from the other online tools in the course. Most importantly,
all code runs in order and immediately unless attached to an event block. Telling a sprite to begin
and start the same behavior won't result in any observable effect because there is no time between
each action.
Goal: Today, students will be programming their own Fish Tank. They ’ll begin by learning how to put
some sprites on the screen, then they will make them move. Finally, they ’ll customize their fish tank to
Transition: Move students to their computers. Encourage students to follow the instructions for each
puzzle. Help them realize that this is a creative activity, intended to help them learn Sprite Lab. It is not
Teaching Tip
questions can be escalated to a nearby group, who might already know the solution. Have students
2 Prediction
3 4 5
7-8 Practice
7 8
9 Free Play
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Was it difficult to finish a lesson where there was no clear "right" and "wrong"?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 6: Making Sprites
50 minutes
Overview Objectives
In this skill-building lesson, students will work through a Students will be able to:
series of programming levels on the computer, finishing
Create an animation using sprites,
with an open-ended “free play ” task where they can
build whatever they like. Students will write programs and behaviors.
and learn about the two concepts at the heart of Sprite Create new sprites and assign
Purpose Preparation
This lesson is designed to introduce students to Play through the levels and review
programming in Sprite Lab. Students will begin to form the *lesson slides.
Links
Make a Copy
Making Sprites
Vocabulary
a task.
Reflection
told to stop.
appearance.
Teaching Guide
Warm Up (10 minutes)
Introduction
Remarks
Last time, we explored apps and games created with Sprite Lab. Today we are going to begin writing
Do this: Using the lesson warm up slides, or this sample project, show students the animation of the ant
and dragonfly.
Discuss: How would you describe this sprite scene? If you wanted someone to create this scene for you
Discussion goal: Students should identify both sprites in this project, describe their behaviors
(movements), and also notice the background. Give students time to brainstorm ideas. If they aren’t
sure what to say, clarify that you are just asking them to state observations about what they see.
Next, show the actual code used for this project and invite students to attempt to read through it.
Reflect: What is the same or different about our instructions and this code?
Making Sprites
Prediction (3 mins)
Do This: Have students read the provided code and make a prediction about what will happen. After
pressing “Run”, provide time for students to reflect on anything they found interesting or that surprised
them.
1 Prediction
Teaching Tip
In prediction puzzles students are asked to read a provided program and answer a question about
it. The question must be answered before the student may press the “Run” button. While it is
possible to use these questions as a form of assessment, keep in mind that they are often placed at
the start of a lesson as a way to get students questioning things before they are even formally
Students should complete the Skill Building levels and then spend any remaining time choosing from the
3 4 5 6 7
8-11 Practice
8 9 10 11
Transition: Students should now skip to the final level in the lesson where they will be able to make their
own project.
Wrap Up (5 minutes)
Reflection
Today you learned how to write code to create programs in Sprite Lab.
Program - An algorithm that has been coded into something that can be run by a machine.
Journaling
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts: What advice would you have for a friend who is interested in creating their own programs in
Sprite Lab?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 7: Sprites in Action
55 minutes
Overview Objectives
In this skill-building lesson, students will work through a Students will be able to:
series of programming levels on the computer, finishing
Create an interactive animation
with an open-ended “free play ” task where they can
build whatever they like. Students will write programs using events.
that respond to timed events and user input. Develop programs that respond
to timed events.
with students.
Agenda
For the teachers
Warm Up (15 minutes)
Make a Copy
Main Activity (35 minutes)
Sprites in Action
Vocabulary
Wrap Up (5 minutes)
Algorithm - A list of steps to finish
Reflection
a task.
something to happen.
Teaching Guide
Do this: Review or introduce the word algorithm: a list of steps to complete a task.
and your job is to follow the algorithm. The commands will always start with “begin” or “stop ”. If I tell
you to begin doing something, you need to start that behavior and keep it going until I tell you to
stop. I might also tell you to “stop everything ” which means you can end all of the behaviors I’ve given
you so far. We ’ll play 3 rounds and after each round I’ll ask you all a couple questions.
Teaching Tip
Be sure to give a little space between commands. For each of these sections, consider running
through the entire sequence without any discussion and later repeating it again after everyone has
Round 1 (Basic):
Begin clapping.
Stop clapping.
Begin clapping.
Stop everything.
Discussion: What happened when you were told to clap but you were already marching in place? What
Round 2 (Intermediate):
Stop everything.
Discussion:
What kinds of instructions caused people to make mistakes? What strategies do you think are helpful for
making sure you follow instructions correctly? Why is it important to keep track of each behavior
separately?
Students should understand that each behavior needs to be stopped individually. They need to keep
Challenging
Begin crouching.
Stop crouching.
Stop tapping your head.
Stop everything.
Begin clapping.
Stop everything.
Begin crouching.
Stop everything.
Stop everything.
Discussion: What happens if two behaviors seem to conflict with each other?
What should you do when told to clap your hands and flap your arms at the same time?
What happens if you need to tap your knees and your head at the same time?
When you were told to spin in two opposite directions what did you see people do?
What would happen if you were told to spin left and right at the exact same time?
Students should understand that some behaviors conflict with each other which can result in
unexpected outcomes. It’s possible for two opposite behaviors to effectively cancel each other out.
Sprites in Action
Prediction (2 mins)
Do This: Have students read the provided code and make a prediction about what will happen. After
pressing “Run”, provide time for students to reflect on anything they found interesting or that surprised
them.
1 Prediction
Transition: Have students move to their computer and sign in. These activities are suitable for
Students should complete the Skill Building levels and then spend any remaining time choosing from the
3 4 5 6 7
8-13 Practice
8 9 10 11 12 13
Transition: Students should now skip to the final level in the lesson where they will see the same free
play choices as the previous lessons. Encourage students to add events to their projects from last time,
Wrap Up (5 minutes)
Reflection
Remarks
Today you learned to create programs that change over time using events.
Journaling
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts: Arrow keys are one way to make a program more interactive. What other ways could we give
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 8: Virtual Pet with Sprite Lab
60 minutes
Overview Objectives
Students will create an interactive Virtual Pet that looks Students will be able to:
and behaves how they wish in this mini-project lesson.
Create an interactive virtual pet
Students will use Sprite Lab's "Costumes" tool to
customize their pet's appearance. They will then use using events, behaviors, variables,
events, behaviors, and other concepts they have learned and custom art.
your class.
CSTA K-12 Computer Science Standards (2017)
Make sure every student has a
AP - Algorithms & Programming
Reflection Journal.
Agenda
Links
Warm Up (15 minutes)
Reflection
Sprite Lab Documentation -
Resource
Cross-Curricular Opportunity
Vocabulary
told to stop.
something to happen.
Teaching Guide
Introduction
Introduce the Sprite Lab "Costumes" tool that allows students to draw their own costumes.
Can you remember some of the behaviors you have used ? What do they do?
patrolling
jittering
spinning right/left
Think/Pair: Ask students to predict what will happen when the code is run, and to discuss with their
Goal: Today, students will be creating their own virtual pet! They will begin by drawing or selecting a
new costume for a sprite. Then they will create events that cause actions and behaviors upon
interaction.
Online Puzzles
Transition: Move students to their computers. Encourage students to follow the instructions for each
puzzle. Help them realize that this is a creative activity, intended to help them learn Sprite Lab.
Teaching Tip
questions can be escalated to a nearby group, who might already know the solution. Have students
or family. For more information watch or show the class *Pause and Think Online Video.
1 Exploration
2 3 4 5 6
7 Free Play
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What other options would you like to be able to have your pet do?
Cross-Curricular Opportunity
Providing Energy for your Virtual Pet is an optional activity aligned to Common Core ELA and Next
Generation Science Standards, written by our teacher community. Students will create a scientific model
that shows how their virtual pet will receive the energy it needs to survive.
Standards Addressed:
CCSS.ELA.RI.5.7: Draw on information from multiple print or digital sources, demonstrating the
CCSS.ELA.RI.5.9: Integrate information from several texts on the same topic in order to write or
5- PS3-1: Use models to describe that energy in animals’ food (used for body repair, growth, motion,
and to maintain body warmth) was once energy from the sun.
5-LS2-1: Develop a model to describe the movement of matter among plants, animals,
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 9: Dance Party
12 minutes
Overview Objectives
In this skill-building lesson, students will program an Students will be able to:
interactive dance party.
Create dance animations with
code
to timed events
This lesson introduces the core CS concepts of coding
Develop programs that respond
and event programming (using blocks).
to user input
your class.
Links
Wrap Up (7 minutes)
Reflection
Heads Up! Please make a copy of
with students.
Open-ended Programming
Make a Copy
Vocabulary
something to happen.
Program - An algorithm that has
Teaching Guide
Warm Up (5 minutes)
Welcome students to class and very briefly introduce the day ’s activity.
Remarks
Today we're going to do something really creative. What's your favorite way to be creative?
Encourage students to share the ways they express creativity, such as with art, dance, music, writing.
Explain that today we're going to be creative with our code. Just like choosing which type of colors of
paint to use, or what kinds of words you write with can be express creativity, choosing what code you
write and how people interact with it can be an opportunity to express your creativity too!
Get up and dance: Announce to the class that today we're going to see how we can combine coding
with dancing in a creative way. Ask your kids to floss, dab, or do a creative dance move of their own for
10 seconds to get them in the mood. You can play a song from this *Spotify Playlist to help kick things
Music Filtering
This tutorial features songs from popular artists. To get a preview of the song list in this tutorial, check
out this *Spotify Playlist. We are using radio-safe versions of all songs. For students under 13, we limit
the music to this filtered list. If you would like to use the filtered list with older students, you can share
Warm Up
Drag the red make a new block from the toolbox on the left to the workspace on the right. Connect
You have now written your first program. Make sure to press Run to see what happens. You should
hear music and see a character start to move in the display area.
2 Practice
Events
Events Level 4
The green blocks are event blocks. These blocks start a new sequence of code and do not need to
Connecting the purple block under the green event block allows you to make the character perform
Make sure to press the arrow buttons after pressing Run or the dancer(s) won’t move.
Events Level 5
Make sure to bring out a second purple do once block. You should have a bears do once block and
a cats do once block in your workspace. Both should be connected to a green when pressed event
block.
Make sure to press the arrow buttons after pressing Run or the dancers won’t move.
4-5 Events
4 5
Measures
Measures Level 7
Levels 7-8 are about synchronizing the dance to the music.
The after measures event blocks also start a new sequence of code and should not be connected
Connecting the purple do forever block under the green after measures event block should make
the character perform a dance move after the number of measures you indicate.
The do forever block works differently from the do once blocks seen in the previous levels.
Measures Level 8
Make sure to bring out a second green event block. You should have a after 4 measures block and a
after 6 measures block in your workspace. Both should have purple block connected underneath.
Measures Level 9
Use the new block provided into the toolbox to create a set of smaller dancers. *You should also use
Many students will be familiar with the idea that you can make something seem to be further away
by drawing it a smaller scale. In the next level you’ll be able to fine tune this effect.
7-9 Measures
7 8 9
Properties
Properties Level 11
Levels 11-13 are about adjusting the properties (e.g. size, color) of the dancers.
It is important to make sure that the teal set block is placed somewhere in the program after the
dancers have been created. To solve this puzzle, place a set size block anywhere in your program
Dancers created as a group have a default size of 30. Other dancers have a default size of 100.
Properties Level 12
As with the previous level, make sure to only use the set tint to (color) block after you have made
the dancers in your program. For example, placing it as the first step in the setup area of your
Properties Level 13
With the right code, you should see the dancer cycle through different colors, sizes, or dance moves.
Make sure there is a teal change, a teal randomize block, or a purple do forever block connected
Make sure do forever blocks are set to either (Next), (Previous), or (Random). Otherwise, the
Note that the code students write in this level is not checked for correctness. This means they will
always pass the level, even if they do not change the program. Students should feel free to
experiment with their code in ways that are interesting to them. Click the “Finish” button to move
on.
Making new dancers inside the every 2 measures block will cause your program to create multiple
identical dancers at the same location(s) and may lead to unintended consequences!
11-13 Properties
11 12 13
Teaching Tip
By this point in the lesson you may notice that the instructions are less prescriptive. Encourage
students to be creative and explore the new blocks that are introduced. From this point on student
code is not checked for correctness in order to encourage experimentation instead of solving a
specific task.
Party On!
This last level is very open-ended. The tutorial itself is designed to give students ample time to keep
Encourage Sharing: If students have cell phones with a data plan they can quickly text a link to
their projects to their own phone or a friend's. If your school policy allows it, encourage them to do
so here.
Encourage Creativity: Creativity is important throughout this lesson, but this is true here more than
anywhere else!
15 Free Play
Wrap Up (7 minutes)
Reflection (5 minutes)
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What is something you enjoyed about today's activity?
Cross-Curricular Opportunity
Survival of the Dancers is an optional activity aligned to Next Generation Science Standards, written by
our teacher community. Using Dance Party, students will select at least one organism (dancer) which is
well suited for the environment (world) they create. Students are encouraged to utilize the “properties”
blocks of code to customize the characteristics of each organism (dancer).
Standards Addressed:
NGSS.3-LS4-2: Use evidence to construct an explanation for how the variations in characteristics
among individuals of the same species may provide advantages in surviving, finding mates, and
reproducing.
NGSS.3-LS4-3: Construct an argument with evidence that in a particular habitat some organisms
can survive well, some survive less well, and some cannot survive at all.
OPTIONAL EXTENSION: NGSS.3-LS4-4: Make a claim about the merit of a solution to a problem
caused when the environment changes and the types of plants and animals that live there may
change.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 10: Loops with Rey and BB-8
45 minutes
Overview Objectives
This skill-building lesson has students using loops to help Students will be able to:
the Star Wars character BB-8 efficiently traverse a maze.
Break down a long sequence of
Employ a combination of
In this lesson, students will be learning about loops and
sequential and looped commands
how to implement them in Blockly code. Using loops is an
to reach the end of a maze.
important skill in programming because manually
Identify the benefits of using a
repeating commands is tedious and inefficient. With the
Code.org puzzles, students will learn to add instructions loop structure instead of manual
Introduction
Reflection
Make a Copy
Extended Learning
Vocabulary
Teaching Guide
Warm Up (10 minutes)
Introduction
If you're comfortable, give an introduction to BB-8 from Star Wars. Many children may be familiar with
Pull up the online puzzles and choose a puzzle to do in front of the class. We recommend puzzle 10 for
its staircase pattern. Ask the students to write a program to solve the puzzle on paper. Have the
students circle repeated chunks and label with the number of repeats.
2 Practice
3 Prediction
5 6 7 8 9
10 Challenge
11-12 Practice
11 12
13 Prediction
14 Practice
As students work through the puzzles, see if they can figure out how many blocks they use with a loop
vs. not using a loop. *Student Video works really well with this set of puzzles because there are a few
ways to fill the loops. Push for friendly discussion between pairs in instances of disagreement on how to
solve the puzzle. Have the students ask each other questions like:
We also recommend having paper on hand for students to write out their code and find any repetition
to use in loops.
Wrap Up (5 minutes)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Think of something that repeats over and over again. What might the program for that look like?
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
So Moving
Give the students pictures of actions or dance moves that they can do.
Have students arrange moves and add loops to choreograph their own dance.
Connect It Back
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 11: Mini-Project: Sticker Art
60 minutes
Overview Objectives
This mini-project lesson builds on the understanding of Students will be able to:
loops. Students will create unique artwork with the Artist.
Differentiate between commands
Preparation
CSTA K-12 Computer Science Standards (2017) different from everything that
Reflection Journal.
Agenda
Vocabulary
Warm Up (15 minutes)
Reflection
Cross-Curricular Opportunity
Teaching Guide
Introduction
Students should have had plenty of introduction to loops at this point. Based on what you think your
As a class, play through a puzzle from the last lesson, "Loops with Rey and BB-8".
Review how to use Artist by playing through a puzzle from "Creating Art with Code".
All of these options will either review loops or the artist, which will help prepare your class for fun with
Encourage creativity during this activity! The instructions give examples but it is okay for students to
experiment with different stickers or types of designs. Even the example solutions we provide are not
Teaching Tip
This lesson may feel very different from what has come earlier in the course. These levels have some
new characteristics you may want to explore before starting. The code your students write in one
level will automatically transfer over to the others. This allows them to build gradually and iterate on
their ideas as they learn. Note that these levels are not checked for correctness to allow for more
open-ended creativity. Empower your students to determine for themselves when they have
1 2 3 4 5 6 7 8
9 Free Play
Some students may discover where to add repeat loops by writing out the program without loops
then circling sections of repetitions. If the students in your class seem like they could benefit from this,
have them keep paper and pencils beside them at their computers. Students might also enjoy drawing
some of the shapes and figures on paper before they program it online. (When drawing stamps, it can
be easier to symbolize those with simple shapes like circles and squares.)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What is another shape or figure you would like to program? Can you come up with the code to
create it?
Cross-Curricular Opportunity
Loopy Forms & Their Functions is an optional activity aligned to Common Core ELA, Common Core
Math and Next Generation Science Standards, written by our teacher community. Artist needs to help
his friends design their house by drawing blueprints. It is important that students understands basic
shapes and how each shape serves different functions in the house blueprints. They will then write
opinion pieces, supply reasons and use linking words to justify their design choices.
Standards Addressed:
CCSS.ELA-LITERACY.W.2.1: Write opinion pieces in which they introduce the topic or book they are
writing about, state an opinion, supply reasons that support the opinion, use linking words (e.g.,
because, and, also) to connect opinion and reasons, and provide a concluding statement or section.
given number of angles or a given number of equal faces.1 Identify triangles, quadrilaterals,
NGSS.K-2-ETS1-2: Develop a simple sketch, drawing, or physical model to illustrate how the shape of
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 12: Nested Loops in Maze
55 minutes
Overview Objectives
In this skill-building lesson, students will learn how to Students will be able to:
program a loop inside of another loop.
Break complex tasks into smaller
repeatable sections.
write out the long way. After a video introduces nested Play through the puzzles to find
loops, students are shown an example and asked to any potential problem areas for
predict what will happen when a loop is put inside of
your class.
another loop. This progression leads to plenty of practice
Make sure every student has a
for students to solidify and build on their understanding
Reflection Journal.
of looping in programming.
Vocabulary
Full Course Alignment
Standards Command - An instruction for the
Introduction
Reflection
Teaching Guide
Briefly review with the class what loops are and why we use them.
Tell the class that they will now be doing something super cool: using loops inside loops. Ask the class to
predict what kinds of things we would be using a loop inside of a loop for.
If a loop repeats a pattern, then looping a loop would repeat a pattern of patterns!
Students don't need to understand this right away, so feel free to move on to the online puzzles even if
We highly recommend pair programming for this lesson. This may not be an easy topic for the majority
of your students. Working with a partner and discussing potential solutions to the puzzles might ease
Also, have paper and pencils nearby for students to write out their plan before coding. Some puzzles
have a limit on the number of certain blocks you can use, so if students like to write out the long answer
1-2 Practice
1 2
4 Prediction
5-9 Practice
5 6 7 8 9
10 Challenge
11-12 Practice
11 12
13 Prediction
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Can you draw a puzzle that would use a nested loop? Try coding the solution to your own puzzle.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 13: Snowflakes with Anna and
Elsa
60 minutes
Overview Objectives
This mini-project lesson takes students through a series Students will be able to:
of exercises to create snowflake images using characters
from the Frozen movies. Break apart code into the largest
Vocabulary
Reflection
Teaching Guide
Introduction
If you were to teach nested loops to a friend, what would you say to help them understand?
If there's time, give an introduction to the main characters of today's puzzles, Anna and Elsa from
Frozen. Give the class the sisters' back story if the class doesn't already know. To build excitement, tell
the class they will be using nested loops to make some fantastic drawings with Anna and Elsa's ice
skates!
This set of puzzles is set up as a progression. This means every puzzle builds a foundation for the next
puzzle. Students will enjoy making more and more interesting designs by making small and simple
1 2 3 4
5-6 Practice
5 6
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
How would the code for your snowflake look different if you only used one loop? No loops? Can you
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 14: Looking Ahead with Minecraft
45 minutes
Overview Objectives
This skill-building lesson gives students the chance to Students will be able to:
practice concepts that they have learned up to this point
Define circumstances when
and get their first experience with conditionals!
certain parts of a program should
Vocabulary
Wrap Up
Reflection
Extended Learning
Teaching Guide
Introduction
Gather the class together and ask two volunteers to walk straight in some direction in the classroom. If
they encounter a chair out of place, they must step over it. If they reach a wall, they must sit down.
Once all of the students are sitting down, ask how you would program a robot to respond to a wall or a
chair. Remind students that you cannot simply say "Step over chair" unless you know there is a chair,
and you will not always know there is a chair. It might be helpful to translate the task into instructions
like:
walk forward
sit down
Tell students they will be using conditionals during this lesson. Give the definition of:
Condition: A statement that a program checks to see if it is true or false. If true, an action is taken.
Otherwise, the action is ignored.
Online Puzzles
Students are in for a real treat with this lesson. It's likely most of your students have heard of Minecraft ,
but give a brief introduction for those that may not know.
Minecraft is a game of cubes. You can play as Alex or Steve as you work through mazes. You'll need to
avoid lava, pick up items, and explore in a world made up of cubes of things.
Demonstrate one of the puzzles to the class (we recommend puzzle 11.) Once all questions have been
addressed, transition students to computers and let them start pair programming.
1 2 3 4 5 6 7 8 9 10
11-13 Challenge
11 12 13
14 Free Play
Wrap Up
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Draw a feeling face to show how you felt during today ’s lesson.
Draw something else you could have built in this minecraft world.
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
More Minecraft
If you find that your class really enjoys the Minecraft environment, here are some links to other
Minecraft games they can play online. These games will also teach basic coding skills.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 15: If/Else with Bee
55 minutes
Overview Objectives
In this skill-building lesson, your class will continue to Students will be able to:
code with conditionals, allowing them to write code that
Solve puzzles using a combination
functions differently depending on the specific conditions
conditionals.
program.
Students will practice using conditionals in their
Links
Agenda
Extended Learning
Vocabulary
Teaching Guide
Introduction
We are going to use conditionals with the Code.org bee to help him deal with some mysterious clouds.
We don't know if his flowers have nectar or not, so we'll need to use conditionals to make sure that we
collect nectar if it's there, but that we don't try to collect nectar from a flower that doesn't have any.
Ask the class what the bee should do when it gets to the cloud.
Use the if at flower / else block. Ask the class what the bee should do if there's a flower. If there's
not a flower, there will be a honeycomb. What should the bee do then?
The bee should get nectar if there is a flower and make honey if there is a honeycomb.
Fill in the rest of the code and press Run. Discuss with the class why this worked.
These puzzles might sprout some questions, so have the students work in pairs or implement the "Ask
three before you ask me" rule (have the students ask three other peers for help before they go to the
teacher.) This will spark discussions that will develop each student's understanding.
2 Prediction
3 4 5 6 7
9 Skill Building
10 Prediction
11 Challenge
12-13 Practice
12 13
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What are some other conditionals a bee might use? Examples include:
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
True/False Tag
The Caller chooses a condition and asks everyone who meets that condition to take a step forward.
Try switching it up by saying things like "If you are not blonde, step forward."
Nesting
Have them write if statements for playing cards on strips of paper, such as:
Using three pieces of paper, have students write three different programs using only the sets of
Now, students should run through all three programs using the cards that they drew, in the same
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 16: While Loops in Farmer
60 minutes
Overview Objectives
In this skill-building lesson, students will be working to fill Students will be able to:
holes and dig dirt in Farmer, but they will not know the
Distinguish between loops that
size of the holes or the height of the mounds of dirt. To
solve these puzzles, students will use a new kind of loop. repeat a fixed number of times
condition is true.
your class.
Introduction
Make a Copy
Wrap Up (15 minutes)
Reflection
Vocabulary
allowing an action.
condition is true.
Teaching Guide
Introduction
Use "while" in a sentence in front of the students. Ask the students what the word "while" means. If you
were to say "while there is a hole, fill it with dirt" what would they do? How long would they do that?
When you use a word like “while ”, you are relying on a condition to tell the computer how long the loop
should run. A condition is a statement that is tested and found to be true or false. In the case above, the
condition is true, if there is a hole. It’s only possible for there to be a hole or for there not to be a hole,
Tell the students they will be learning about a new kind of loop. Previously, students only used loops to
repeat a command a certain number of times. Here, they won't always know how many times to repeat
the command, however, they will know when to stop or when to keep going. While loops allow the
programmer to repeat a command as long as a condition is still true. In the previous example, the
If there's time, have the students discuss other times using a while loop would be useful. Examples
include:
Pull up a puzzle from today's online Code Studio puzzles. We recommend Puzzle 6.
Ask the class what the farmer should do when she gets to the pile of dirt.
Use the while there is a pile / do block. Ask the class what the farmer should do within the while
loop.
The farmer should remove 1. The farmer will keep "removing 1 dirt" while there is dirt. In other
Fill in the rest of the code and press Run. Discuss with the class why this worked.
While loops are not always a difficult concept for students to understand, but if you think your class
might struggle with these puzzles, we recommend pair programming. This will allow students to bounce
ideas off each other before implementing the code. Pair programming works to increase confidence
5 Prediction
6 7 8 9
10 Challenge
11-12 Practice
11 12
13 Prediction
14 Lesson Extras
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What is the difference between a while loop and a normal repeat loop?
Give an example of a puzzle where you would use a while loop, but not use a repeat loop. Can you
give an example of a puzzle where you would use a repeat loop, but not a while loop?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 17: Conditionals in Minecraft:
Voyage Aquatic
60 minutes
Overview Objectives
In this context-setting lesson, students will get the Students will be able to:
chance to practice content that they have learned up to
Define circumstances when
this point, as well as getting a sneak peek at conditionals!
certain parts of a program should
Vocabulary
Reflection
Extended Learning
Teaching Guide
Introduction
Gather the class together and ask two volunteers to walk straight in some direction in the classroom. If
they encounter a chair out of place, they must step over it. If they reach a wall, they must sit down.
Once all of the students are sitting down, ask how you would program a robot to respond to a wall or a
chair. Remind students that you cannot simply say "Step over chair" unless you know there is a chair,
and you will not always know there is a chair. It might be helpful to translate the task into instructions
like:
walk forward
sit down
Tell students they will be using conditionals during this lesson. Give the definition of:
Condition: A statement that a program checks to see if it is true or false. If true, an action is taken.
Otherwise, the action is ignored.
Students are in for a real treat with this lesson. It's likely most of your students have heard of Minecraft ,
but give a brief introduction for those that may not know.
Minecraft is a game of cubes. You can play as Alex or Steve as you work through mazes. You'll need to
Demonstrate one of the puzzles to the class. Once all questions have been addressed, transition
2 3 4
6 7 8
10 11 12 13 14
16 Free Play
Reflection
Prompts:
Draw a feeling face to show how you felt during today ’s lesson.
Draw something else you could have built in this Minecraft world.
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
More Minecraft
If you find that your class really enjoys the Minecraft environment, here are some links to other
Minecraft games they can play online. These games will also teach basic coding skills.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 18: Until Loops in Maze
60 minutes
Overview Objectives
In this skill-building lesson, students will learn about until Students will be able to:
loops. Students will build programs that have the main
Build programs with the
character repeat actions until they reach their desired
strategies to implement
conditionals.
programs.
Preparation
Vocabulary
Agenda Condition - Something a program
true.
Teaching Guide
Introduction
In this lesson, students will be creating loops that only run until a condition is true. Help the students
understand how this works by leading them in group activities and having them do an action until some
condition is true. For example: Have students touch their nose until you tell them to stop.
Ask the class what the bird should repeat to get to the pig.
The bird should repeat move forward, turn right, move forward, and then turn left.
Ask the class what they can use to repeat this code.
The bird should repeat this pattern until it reaches the pig.
Fill in the rest of the code using the repeat until loop and press Run. Discuss with the class why this
worked.
Bringing together concepts is not easy, but this set of levels is meant to help students see the endless
possibilities of coding when using conditions. If students struggle at all with understanding the
similarities or differences between while loops and until loops, have them try to think of how they would
1 Skill Building
3 Prediction
4 5 6 7 8
9 Challenge
10 Practice
11 Prediction
Wrap Up (15 minutes)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 19: Harvesting with Conditionals
50 minutes
Overview Objectives
Students will practice while loops, until loops, and if / else Students will be able to:
statements. All of these blocks use conditionals. By
Nest conditionals to analyze
practicing all three, students will learn to write complex
Vocabulary
Full Course Alignment
Standards Condition - Something a program
Reflection
Teaching Guide
Warm Up (5 minutes)
Introduction
Students shouldn't need as much of an introduction to concepts today because they have had practice
with them in the previous lesson. Instead, you can share the story of the harvester.
The harvester is trying to pick crops like pumpkins, lettuce, and corn. However, the farmer has forgotten
where she planted these crops, so she needs to check each plant before harvesting.
Students will continue to work with if / else statements, while loops, and until loops. These puzzles are a
bit more challenging, though, so encourage students to stick with them until they can describe what
2 3 4 5
6-7 Practice
6 7
8 Challenge
9-10 Practice
9 10
11 Prediction
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
What if people only spoke in if/else statements? What would be some advantages and
disadvantages of this?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 20: Functions in Minecraft
60 minutes
Overview Objectives
In this skill-building lesson, students will begin to Students will be able to:
understand how functions can be helpful!
Use functions to simplify complex
programs.
your class.
CSTA K-12 Computer Science Standards (2017)
Make sure every student has a
AP - Algorithms & Programming
Reflection Journal.
Agenda Links
Functions in Minecraft
Make a Copy
Vocabulary
again.
Teaching Guide
Introduction
Help the class understand that functions are simply a chunk of code that has a name. Once defined, you
can use that name over and over in your program to tell the computer to run the chunk of code that
Pull up a puzzle from the lesson. We recommend puzzle 9. As a class, work through the puzzle without
using functions. Once you have gotten the solution, display it on a white board or overhead.
On the white board or overhead, rewrite the program without the repeated code, but leaving one line
space. In that/those line space(s), call a function. Off to the side, declare the function like the left
example block in the lesson tip. Ask the class what they think the code will do now.
Open up a discussion with the class on why functions could be useful in programming. Invite students to
Teaching Tip
Function blocks:
The block to the left is a function declaration, a block that students will name and use to fill in the
function. The block to the right is a function call, a block that makes the function code run. Students
Functions in Minecraft
Teaching Tip
We recommend providing paper and pencils for students to write (or draw) out ideas. Also, if
students are having trouble recognizing patterns, have them work with a partner on the harder
puzzles.
2 3
5 6 7 8 9
11 12 13 14
16 Free Play
Reflection
Prompts:
What did your functions do in the programs you wrote today? How did that help you?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 21: Functions with Artist
60 minutes
Overview Objectives
In this skill-building lesson, students will use functions Students will be able to:
with the Artist.
Categorize and generalize code
off the previous puzzle. At the end of this lesson, Play through the puzzles to find
students will feel confident and proud of their hard work.
any potential problem areas for
your class.
with students.
Warm Up (15 minutes)
Introduction
Reflection
Vocabulary
Extended Learning
Function - A piece of code that
again.
Teaching Guide
Introduction
Tell the class that there are two main components to using functions.
1. The Declaration: Function declarations are what create a function. In a function declaration, you fill in
the function with code and you give the function a name. You must declare a function before you
2. The Call: Function calls are what makes the program run the code in the function. To call a function,
you place the name of the function in your program. Make sure your function is properly defined
Students may benefit from writing code without functions then creating functions from the repeated
code. If students don't enjoy doing this in the Code.org workspace, we recommend providing paper
and pencils for students to write (or draw) out their ideas.
1 Prediction
2-9 Practice
2 3 4 5 6 7 8 9
10 Challenge
11 Practice
12 Prediction
13 Free Play
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Sketch out a drawing you made today. Can you write the code needed to create this?
Draw a picture you would like to create with code. Try writing or drafting the code that would make
that drawing.
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other
enrichment.
Draw by Functions
Break the class into groups of 2-3 students. Have each group write a function that draws some kind of
shape and a program that uses that function. Depending on the creativity or focus the groups, students
might need to be assigned a shape to create. Once every group is done, have the groups switch
programs. On a separate piece of paper, each group should draw what the program creates. The
groups should then return the programs and drawings to the original group.
Did every group get the drawing they expected? If not, what went wrong? Have the class go through
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 22: Functions with Harvester
55 minutes
Overview Objectives
In this skill-building lesson, students will use conditionals Students will be able to:
with functions to harvest crops in Harvester.
Recognize when a function could
Vocabulary
Reflection
Teaching Guide
Introduction
At this point, your students should already be introduced to functions. Take this time to have them
discuss the advantages and disadvantages of using functions in a program. Either have them pair-share
or discuss as a class. Try using examples of hard or easy puzzles in either Artist or Bee.
Online Puzzles
Some puzzles will have a function pre-declared for the students to fill in. It may be helpful for the
students to write the entire program without a function first, then determine where a function would be
It's important to make sure that every student is completing each puzzle with a dark green dot. If some
of your students are struggling to simplify code and use functions, set up teams of expert students
Don't forget to provide pencils and paper to help students sketch out possible solutions.
1-6 Practice
1 2 3 4 5 6
8-10 Practice
8 9 10
11 Challenge
12 Practice
13 Prediction
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 23: Text and Prompts
45 minutes
Overview Objectives
In this skill-building lesson, students will get practice with Students will be able to:
variables in Sprite Lab.
Actions Use variables to hold
prompts.
Variables will be used in this course to store and modify
over time to keep track of things like a player’s score in a Play through the levels and review
with students.
Review Resource
Teaching Guide
Warm Up (5 minutes)
Review
Discuss: How do computer programs ask us for information?
Discussion Goal: Students should think about their own experiences as users and times when a
computer asks them for information. There are lots of ways to input information into a computer, but
Remarks
When a message on the computer screen is waiting for your input we call that a prompt. When a user
types into a prompt, it’s like the computer is storing the information in a container. The variable's label
tells us what kind of information to expect. Today we are going to learn the code to create a prompt in
Sprite Lab.
Prediction (5 mins)
Do This: Have students read the provided code and make a prediction about what will happen. After
pressing “Run”, provide time for students to reflect on anything they found interesting or that surprised
them.
1 Prediction
Video (5 minutes)
Teaching Tip
Just like when students are writing or communicating verbally, it's important to set expectations on
using words appropriately in this activity. Students should understand that they are responsible for
the code that they write, including any text that shows on the screen. The text should be respectful,
as well as safe. Students can practice not sharing personal information in their programs, especially if
they want to share with others. Note that any information typed into a Sprite Lab prompt isn't saved
long-term. Words and messages typed by the users of these apps is gone once the app is reset.
Transition: Have students move to their computer and sign in. These activities are suitable for
Students should complete the Skill Building levels and then spend any remaining time choosing from the
Teaching Tip
This lesson has more skill building and practice levels than previous lessons, because students are
learning a few new skills all at once. As such, there is not a dedicated “free play ” level. However,
students who are feeling confident with their new skills can choose the last practice option to start
from scratch with a blank project. In the next lesson, students will also be working exclusively on their
9-15 Practice
9 10 11 12 13 14 15
Review
Do This: Use the lesson slides to review the vocabulary for this lesson. Be sure that students can recall
Remarks
When a user enters information into a prompt, the computer stores it with a variable. The prompt can
also trigger an event. If the code uses a variable, the computer will look for a matching label to find
Reflection
Pick one (or both) of the reflection prompts below to give to students. They can journal individually, or
Prompts:
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 24: Using Variables with the
Artist
40 minutes
Overview Objectives
In this skill-building lesson, students will explore the Students will be able to:
creation of repetitive designs using variables in the Artist
Assign values to existing variables.
environment. Students will learn how variables make
code easier to write and easier to read. After guided Use variables to change values
puzzles, students will end in a free play level to show inside of a loop.
what they have learned and create new designs. Utilize variables in place of
program.
Purpose
CSTA K-12 Computer Science Standards (2017) Heads Up! Please make a copy of
Review (Download)
Teaching Guide
Warm Up (5 minutes)
Review
It might be helpful to remind students of what they know about variables so far.
Consider reviewing the Prediction level and video with the full class before moving students on to the
1 Prediction
3 4 5 6
7 Free Play
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
Have you tried mixing multiple variables into one program? What might that look like? When would
it be helpful?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 25: Variables with the Bee
60 minutes
Overview Objectives
This skill-building lesson will help illustrate how variables Students will be able to:
can make programs more dynamic by allowing values to
Examine code to find places
change while the code is running.
where variables can be
Preparation
Full Course Alignment
Standards Play through the puzzles to find
Reflection Journal.
Agenda
Vocabulary
Warm Up (15 minutes)
Variable - A label for a piece of
Introduction
information used in a program.
Reflection
Teaching Guide
Introduction
This series is a little different than what students have done in the past. Now, instead of simply assigning
a value to a variable and running your code, you'll need to help students see how a variable can be
Display Show students the play area from one of the later puzzles.
There are several things to unpack here, so you might need to give your students a chance to look at it
Think/Pair: What patterns do you notice in this puzzle? What are the differences between the flower
honeycomb patches at the beginning, middle, and end of the bee's path?
Discuss: What are the ways we could program a solution to this puzzle? How could we use a variable to
This set of puzzles takes some serious computational thinking skills. If you find that students are getting
stuck, help them break down the puzzles into the individual pieces:
What would it look like if the flowers/honeycomb all had the same amount of nectar/honey?
Now how can you use a variable to get the quantities the way you want them?
1 2 3 4 5 6 7
8-10 Practice
8 9 10
Wrap Up (15 minutes)
Reflection
Having students write about what they learned, why it’s useful, and how they feel about it can help
solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Prompts:
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 26: For Loops with Bee
60 minutes
Overview Objectives
This skill-building lesson focuses on for loops and using Students will be able to:
an incrementing variable to solve more complicated
Determine starting value,
puzzles.
stopping value, and stepping
with students.
Agenda
For the students
Warm Up (15 minutes)
Unplugged Blocks (Courses C-F)
Introduction
Make a Copy
Teaching Guide
Display a puzzle from the lesson. We recommend the prediction level because it displays a potential
Online Puzzles
Some students may have a hard time differentiating between repeat loops and for loops. We
recommend having scratch paper out for students to make guesses on values like the start, stop, and
step. Implementing pair programming amongst the class might also be helpful for your students.
1-2 Review
1 2
5 Prediction
6 7 8
9-13 Practice
9 10 11 12 13
Wrap Up (15 minutes)
Reflection
Prompts:
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 27: For Loops with Artist
60 minutes
Overview Objectives
In this skill-building lesson, students practice “for” loops Students will be able to:
with Artist. Students will complete puzzles to create
Recognize when to use a for loop
complex designs and unique art.
and when to use other loops such
Vocabulary
Reflection
Teaching Guide
Introduction
On a board displayed to the entire class, draw (or display via projector) one of the final designs from
the Code Studio puzzles associated with this lesson. We recommend one of the following:
Ask the class how a computer might draw the drawing you displayed.
After a few predictions have been said, reply with for loops of course!
Tell the students they will soon be learning how to create these fine drawings using for loops and
variables.
Teaching Tip
These puzzles are super fun, but it may be helpful for students to have protractors, pencils and
scratch paper to see how these designs were made in the physical form. If that isn't an option in
your class, try to get the students to trace on the computer screen with their fingers.
2 Exploration
3 4 5 6 7
8 Free Play
Wrap Up (15 minutes)
Reflection
Prompts:
Draw one of the designs you made today. What was the code needed to create it?
What are some designs you would like to create? How do you think for loops or variables could help
create those?
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.
Lesson 28: End of Course Project
45 minutes
Overview Objectives
This project lesson takes students through the process of Students will be able to:
designing, developing, and showcasing new projects!
Overcome obstacles such as time
constraints or bugs.
Purpose
that requires planning but also allows for broad creativity. Spend time making your own
Showcase
Links
with students.
Resource
Vocabulary
future
Teaching Guide
Planning
Remarks
We have already had a chance to build a variety of projects. Today, this experience will be much more
open-ended, so it will require planning beforehand! Planning is a very important part of coding a
game or any other kind of software. So, before we jump onto computers, we will spend some time
Distribute: Distribute one *End of Course Project Planning Guide to each student or pair. With
students, go over the steps listed on the guide, then allow them to complete it. Refer to the included
exemplar if needed.
Teaching Tip
If students are pair programming for this assignment, this warm up is a great opportunity for them
to practice sharing and respecting others' ideas. Ensure students are following group work norms
you already have in place in your classroom. Otherwise, spend a brief moment going over your
expectations.
Coding
Equipped with their completed planning guides, students are now ready to bring their projects to life.
These levels correspond to the structure of the planning guide, and help navigate students through the
Teaching Tip
Students will experience plenty of trial and error while coding. Their projects are likely to become
truncated versions of their original scope. Remind students that this kind of compromise is common
in software design. It's okay if they don't get to build in every feature they planned!
Example Projects
1 Example Projects
Showcase
To celebrate students' work, spend the last 10 minutes or so allowing them to showcase their projects.
Public Demo: Select a few exemplary volunteers to briefly demo their projects in front of the class.
As they do so, have them touch on what the planning-to-coding experience was like for them,
Pair Playtesting: Have students or groups pair up and playtest each other's projects. As they do,
ask them to provide positive and constructive feedback to each other. The benefit here is that
students will have the opportunity to provide and respond to feedback in a smaller setting.
Gallery Walk: Ensure all students have their projects ready for testing. Have students move
"musical chairs"-style to another computer and playtest the project there for a few minutes, until
they receive a signal from you to move to another computer. Repeat this every few minutes. While
there is less opportunity for structured communication here, this ensures students get to demo as
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.