Code Your Hero
Lesson Plan
In This Lesson Plan
02 Overview
02 Unit Details
02 Learning Objectives                                                                    .
03 Computer Science Topics Covered
03 Standards Addressed
04 Materials
04 Setup
05 Procedure
06 Solution Guide
Additional Resources
Code Your Hero Teacher Resources
Code Your Hero Lesson Plan ← you are here
Code Your Hero Activity
Optional Planning Activity
Optional Planning Activity: Worksheet
Optional Planning Activity: Drawing Guide
What is CS First?
Google CS First is a computer science curriculum that makes coding easy to
teach and fun to learn. CS First empowers every teacher to teach computer
science with tools and resources free of charge - no CS experience required.
Sign in here. (Not required for this lesson)
In CS First, students code with a tool called Scratch for CS First. Scratch is a
block-based coding tool developed by the Scratch Foundation in collaboration with the
Lifelong Kindergarten group at the MIT Media Lab. Learn more about Scratch at
scratch.mit.edu.For additional resources, check out the Scratch Wiki, including Scratch
Secrets and Hidden Features articles.
 Code Your Hero Lesson Plan
Overview
CS First teaches computer science (CS) concepts through instructional videos that show students how to make
projects in Scratch for CS First, a block-based coding editor. In this Code Your Hero lesson, students choose an
everyday hero and program a story - or even a game - to turn their real-life hero into a superhero. Access the unit
at g.co/csfirst/codeyourhero-teacher.
                 Tip: To extend this lesson, consider the Optional Planning Activity, where students reflect on what
                 makes someone a hero and the everyday heroes in their lives. Then, they draw their hero using simple
                 shapes. The Optional Planning Activity and Code Your Hero can be taught alone or together.
Lesson Details
 In this lesson, students code a story or game about someone in their life they consider an everyday hero. They
 start by opening a starter project in Scratch for CS First, then they watch instructional videos to program their
 own story or game. These example projects (student example1, student example2) show what a student can
 create if they complete multiple add-on videos in the lesson.
 You can use this lesson as a way to introduce your students to coding.
 This lesson was designed for students in grades 3 through 5, but it can be adapted for many different ages and
 audiences. It takes approximately one hour to run.
                 Tip: You can adapt CS First to fit the pacing needs of your classroom - split this lesson between morning
                 and afternoon, divide it among different days, or complete it in one sitting. Younger students and those
                 new to coding may need more time to complete the lesson.
Learning Objectives
 By selecting add-on videos that present coding challenges, students will:
   •       Open a starter project and choose a “costume” for a sprite, or character, to represent their hero.
   •       Use event blocks (like “when flag clicked”) to trigger a series of code.
   •       Sequence “say” and “wait” blocks to make their hero speak and have a dialogue with another character.
   •       Program actions to happen using “when key pressed” events.
   •       Move an object across the screen using motion blocks.
   •       Repeat actions using loop blocks.
   •       Program their hero to score points when they perform a certain action.
   •       Draw their own hero using the “Paint Editor” in the Scratch for CS First coding editor. (This add-on video
           pairs well with the Optional Planning Activity.)
CS First                                    Code Your Hero Lesson Plan                                   2
Computer Science Topics Covered
   •       Parallelism: The process of events occurring simultaneously, either independently or interdependently.
   •       Debugging: The process of identifying and fixing errors in a program that is not functioning as expected.
   •       Control structure: Sections of code that order the direction or flow of how a program functions. The
           control structure in this lesson is focused on loops.
   •       Variable: The process of storing a value, so it can be retrieved and used by the program at any time.
Standards Addressed
This lesson can be adapted for many different language arts classes. Refer to these standards when choosing
how to adapt the lesson to your class. The Optional Planning Activity is required in order to meet these
standards.
 ELA Anchor Standard - CCSS.ELA-LITERACY.CCRA.W.1
 Write arguments to support claims in an analysis of substantive topics or texts using valid reasoning and relevant
 and sufficient evidence.
 Grade 3                              Introduce the topic or text they are writing about, state an opinion, and create an
                                      organizational structure that lists reasons.
 CCSS.ELA-LITERACY
                                      Provide reasons that support the opinion.
                                      Use linking words and phrases (e.g., because, therefore, since, for example) to
                                      connect opinion and reasons.
                                      Provide a concluding statement or section.
 Grade 4                              Introduce a topic or text clearly, state an opinion, and create an organizational
                                      structure in which related ideas are grouped to support the writer's purpose.
 CCSS.ELA-LITERACY
                                      Provide reasons that are supported by facts and details.
                                      Link opinion and reasons using words and phrases (e.g., for instance, in order to, in
                                      addition).
                                      Provide a concluding statement or section related to the opinion presented.
 Grade 5                              Introduce a topic or text clearly, state an opinion, and create an organizational
                                      structure in which ideas are logically grouped to support the writer's purpose.
 CCSS.ELA-LITERACY
                                      Provide logically ordered reasons that are supported by facts and details.
                                      Link opinion and reasons using words, phrases, and clauses (e.g., consequently,
                                      specifically).
                                      Provide a concluding statement or section related to the opinion presented.
CS First                                    Code Your Hero Lesson Plan                                    3
Materials
    1.     Internet-connected computer and a projector
    2.     Computers with internet access (one per student)*
    3.     Headphones (one per student)*
* Don’t have enough computers or headphones? Review the CS First Starter Guide for additional workarounds.
Note: The lesson can be completed online or offline, but both options require access to a computer. Refer to our
Help Center for Tips for Tech-Limited Classrooms.
Setup
    1.     Set up your classroom to ensure videos (with sound) can be played for your entire class.
    2.     Share the unique lesson link or class code, which you can find under your classes from your CS First
           teacher account.
                 Tip: The projects of students in your class are automatically shared with your teacher account.
CS First                                   Code Your Hero Lesson Plan                                  4
Procedure
Introduction: Review “Code Your Hero” concept (3 minutes)
To extend this project, consider the Optional Planning Activity, where students reflect on what makes
someone a hero and the everyday heroes in their lives.
    1.     Introduce the lesson:
                a. [say] In this lesson, you will choose an everyday hero from your own life. Then, you’ll build a project
                   using code that shows your hero as a superhero! An everyday hero is someone that is kind,
                   caring, supportive or encouraging. They can be a friend, pet, parent/grandparent, coach, or
                   teacher.
                b. [ask] Who will you build your project about?
Transition to CS First: Code Your Hero (50 minutes)
    1.     Present the first video of Code Your Hero to the entire class g.co/csfirst/codeyourhero.
    2.     Navigate students to the Code Your Hero lesson.
    3.     Reiterate the video instructions:
               a.   Open the starter project in Scratch for CS First,
               b. Choose a sprite for your hero,
               c.   Add a few “say for 2 seconds” blocks, then
               d. Start your code with a “when flag clicked” event.
               e. Build on your project with “Move Your Hero,”, or try any video you like.
    4. Release students to work. While they’re working:
               a.   Check that students are on-task. Students should have two tabs open (CS First and Scratch for CS
                    First). Look for signs that students might not know what to do, like adding a lot of sprites or
                    dragging out a lot of unrelated blocks.
               b. Talk with students one-on-one about their hero if they have difficulty choosing someone.
               c.   Guide students to select another video to add to their project.
Wrap-up: Reflect on activity (7 minutes)
           Pair students and ask them to review their partner’s project. Answer the following questions (either in
           writing or in whole-class discussion).
               a. What action was the most difficult to code? How did you figure it out?
               b. What other projects could you create using code?
CS First                                       Code Your Hero Lesson Plan                                 5
Solution Guide
Refer to this guide when helping students with their projects. These solutions represent one way to solve a
problem. Students may find their own unique solutions.
For additional resources, check out the Scratch Wiki, including the Scratch Secrets and Hidden Features articles.
Common Needs
  I want to...                   How to
 Restore a deleted sprite       Click Edit → Restore Sprite
 Restore deleted code           Right click → Undo
 Flip the direction of sprite
                                 Select sprite →        Costumes tab →         Select tool →        Flip Horizontal
 Change size of sprite
                                  Select sprite →         Change size
 Sequencing code with
 “wait” blocks                   Hero sprite1                              Hero sprite2
CS First                                  Code Your Hero Lesson Plan                                6
Solution Guide - continued
Refer to this guide to see example code for each video.
 Introduction: From Hero to Superhero                         Move Your Hero
 Choose a sprite as your hero and make them talk.            Program your hero to move up, down, left and right
                                                             with the arrow keys.
 Hero sprite:                                                Hero sprite:
  Fly Over Buildings                                          Add Background Music
 Program the building to move across the bottom of           Customize your project with background music.
 the screen.
 Building sprite:                                            Stage:
CS First                                Code Your Hero Lesson Plan                                   7
Solution Guide - continued
  Show Off with a Super Spin                                   Keep Score
  Program the hero sprite to spin.                            Add code to collect points and keep score.
  Hero sprite:
                                                              Object sprite:
   Support Your Hero                                           Draw Your Own Hero
  Add a new sprite to interact with your hero.                Draw your own sprite using the Paint Editor.
  New sprite:                                                 New sprite via Paint Editor:
Return to first page
CS First                                 Code Your Hero Lesson Plan                                    8