Lesson 2: Code with Anna and Elsa
In this lesson, learners of all ages get an introductory experience with coding and computer science in a safe, supportive environment. This lesson has been designed for learners in the middle grades, ages 10-13, but can be adapted for younger or older learners using the differentiation suggestions provided. Students should have a basic understanding of simple geometry and drawing angles.
This lesson introduces the core CS concepts of coding and programming (using blocks), as well as simple debugging techniques.
Assessment (2 minutes)
Getting Started (5 minutes)
Activity (30-45 minutes)
Wrap Up (5 minutes)
Students will be able to:
- Define “coding” and “computer science”
- Identify key computer science vocabulary
- Make connections between computer science concepts and the real world
- Identify places to go to continue learning computer science and coding
One Week Before Your Hour of Code
- Review the Hour of Code Educator Guide and Best Practices from Successful Educators in order to begin to plan your Hour of Code event.
- Register your Hour of Code event if you’d like to receive swag or classroom support.
- Review and complete the online tutorial yourself: Coding with Anna and Elsa
- Be sure to test it first before asking your students to complete it. Check your technology and decide if you need to troubleshoot anything in advance of your Hour of Code.
- Review the supplementary lesson plan, "The Drawing Machine" to determine whether or not you'd like to lead this lesson in advance of your Hour of Code.
One Day Before Your Hour of Code
- Write the words “coding”, “programming” and “debugging” on the board or add them to your word wall if you have one.
- Write the words "Computer Science" in the middle of your board or on piece of paper at the center of a bulletin board. This will serve as your "mind map" for the Getting Ready and Assessment activities.
- Have protractors available for students new to measuring angles
- Each student who completes the activity should receive a certificate. Print one for everyone in advance to make this easier at the end of your Hour of Code.
- code - (v) to write code, or to write instructions for a computer.
- Debugging - Finding and fixing problems in an algorithm or program.
- Program - An algorithm that has been coded into something that can be run by a machine.
Assessment (2 minutes)
Ask students to add their “Whip Around” sticky notes or note cards to your "Computer Science" mind map on their way out the door. Try to populate the board with lots of great ideas about what CS is and why it matters.
Getting Started (5 minutes)
Setting the Stage
Welcome students to class and very briefly introduce the day’s activity.
If you have time or if your students need a bit more background information, you might consider delivering "The Drawing Machine" before your Hour of Code event. This brief lesson introduces students to the idea of computer-assisted drawing, which will set them up for more success with the Code with Anna and Elsa tutorial.
Say: “Today we’re going to spend one hour learning to code. Has anyone here heard the term “code” before? What does it mean?”
Students might mention that a “code” is like a secret message, or that it’s related to computers in some way.
Explain that in computer science, “code” means a set of instructions that a computer can understand. Let students know that today, they are going to practice “coding,” “programming” and “debugging”.
Define: Coding means to write code, or to write instructions for a computer. - Programming, similarly, means to write code or instructions. Today, you will program with blocks on the computer (if you’re using an online tutorial) or with pen and paper (if you’re using an unplugged activity). - Debugging means to check code for mistakes and try to fix errors.
Ask students to name some jobs they have heard of that are related to coding. Students might mention things such as “programmer”, “computer scientist”, “software developer,” or “engineer”. Capture student responses on your “Computer Science” board, making a mind map of the information your students share.
Say: “You’re right, folks! There are no right or wrong answers here...just about any job these days involves some sort of knowledge of code. While there are many, many careers that require some knowledge of coding, learning to code is something anyone can do. And we’re going to do it today. The things we’re going to do today may not seem immediately like those, but everything you learn today could lead into making the next Angry Birds or Twitter.”
Activity (30-45 minutes)
Challenge your students to complete the Code with Anna and Elsa tutorial.
Depending on the age and ability of your students, you might consider:
- For younger students, we suggest you break your class into pairs or very small groups (three to four students each) and ask each group to work together to complete the tutorial using pair programming. Students in grades K-5 may struggle with the mathematics in the tutorial (it requires a basic understanding of angle measurement). If your students are on the younger side, consider delivering the supplementary lesson plan, "The Drawing Machine" to introduce the basics before you facilitate your Hour of Code.
- For older students, we find that working independently on tutorials works well. Sometimes it helps to allow students to choose their own tutorial. If students aren't interested in Frozen, they can get a similar experience with the Write Your First Computer Program tutorial.
- For adult learners, Code with Anna and Elsa works extremely well either as an independent challenge or a pair programming activity.
Be sure to play through your chosen tutorials yourself, before asking your students to attempt them. That way you’ll know what to expect and can make decisions about whether to let students choose their own tutorial, or if you want to assign tutorials based on student needs.
If a group or individual finishes early, they can attempt another tutorial by visiting code.org/learn.
Wrap Up (5 minutes)
Give each student a few sticky notes or notecards. Facilitate a quick “Whip Around” activity:
- Pose a prompt that has multiple answers such as “Share back something you really liked about the Hour of Code activity you completed” or “Share some skills you learned today."
- Have students write down as many responses as possible, one idea per sticky note or note card. “Whip” around the room, calling on one student at a time. Have students share one of their responses. When called on, students should not repeat a response; they must add something new.
- After completing the whip around, have students discuss which ideas and themes showed up most in their responses.
Explain that you are spending one hour coding today, because this week is CS Education Week, and millions of other students across the globe have also been learning one Hour of Code this week. Congratulate students on being part of this world wide movement.
Give each student a certificate with his or her name on it.
Let students know that if they enjoyed today’s activity, they have many options for continuing to code. Encourage students to visit code.org/learn for a list of options, or, if you’re planning any of the extension activities that follow, tell students what’s coming next in your classroom.
Beyond an Hour of Code
After your Hour of Code ends, there are many ways to continue teaching computer science in your K-5 classroom. Here are some ideas:
- Teach the Code Studio Computer Science Fundamentals courses. These four courses are designed for young learners. Students work their way through a series of puzzles that teach them to code, and educators have access to engaging lesson plans that help make the learning coming alive. Code.org offers free professional development for these courses, online or in-person.
- Research some of the careers in coding you identified today. Find resources on planning career research projects on Sharemylesson.com.
- Invite a computer science expert to talk to your class about his or her work. Don’t know any local computer scientists? Try signing up for a virtual classroom visit through Code.org’s and Skype's Guest Speakers in Computer Science program.
CSTA K-12 Computer Science Standards (2011)
CPP - Computing Practice & Programming
- CPP.L1:3-02 - Use developmentally appropriate multimedia resources (e.g., interactive books and educational software) to support learning across the curriculum.
- CPP.L1:3-04 - Construct a set of statements to be acted out to accomplish a simple task (e.g., turtle instructions).
- CPP.L1:6-01 - Use technology resources (e.g., calculators, data collection probes, mobile devices, videos, educational software and web tools) for problem-solving and self-directed learning.
- CPP.L1:6-06 - Implement problem solutions using a block based visual programming language.
ISTE Standards for Students
1 - Creativity and Innovation
- 1.a - Apply existing knowledge to generate new ideas, products, or processes.
- 1.c - Use models and simulations to explore complex systems and issues.
4 - Critical Thinking, Problem Solving, and Decision Making
- 4.b - Plan and manage activities to develop a solution or complete a project.
6 - Technology Operations and Concepts
- 6.a - Understand and use technology systems.
- 6.c - Troubleshoot systems and applications.
- 6.d - Transfer current knowledge to learning of new technologies.
Common Core English Language Arts Standards
L - Language
- 11-12.L.6 - Acquire and use accurately general academic and domain-specific words and phrases, sufficient for reading, writing, speaking, and listening at the college and career readiness level; demonstrate independence in gathering vocabulary knowledge when consider
- 4.L.6 - Acquire and use accurately grade-appropriate general academic and domain-specific words and phrases, including those that signal precise actions, emotions, or states of being (e.g., quizzed, whined, stammered) and that are basic to a particular topic (e.g
- 5.L.6 - Acquire and use accurately grade-appropriate general academic and domain-specific words and phrases, including those that signal contrast, addition, and other logical relationships (e.g., however, although, nevertheless, similarly, moreover, in addition).
RI - Reading Informational
- 11-12.RI.4 - Determine the meaning of words and phrases as they are used in a text, including figurative, connotative, and technical meanings; analyze how an author uses and refines the meaning of a key term or terms over the course of a text (e.g., how Madison define
Common Core Math Standards
G - Geometry
- 7.G.2 - Draw (freehand, with ruler and protractor, and with technology) geometric shapes with given conditions. Focus on constructing triangles from three measures of angles or sides, noticing when the conditions determine a unique triangle, more than one triangl
MD - Measurement And Data
- 4.MD.6 - Measure angles in whole-number degrees using a protractor. Sketch angles of specified measure.
MP - Math Practices
- MP.1 - Make sense of problems and persevere in solving them
- MP.2 - Reason abstractly and quantitatively
- MP.5 - Use appropriate tools strategically
- MP.6 - Attend to precision
- MP.7 - Look for and make use of structure
- MP.8 - Look for and express regularity in repeated reasoning
NBT - Number And Operations In Base Ten
- 4.NBT.4 - Fluently add and subtract multi-digit whole numbers using the standard algorithm.
- 4.NBT.5 - Multiply a whole number of up to four digits by a one-digit whole number, and multiply two two-digit numbers, using strategies based on place value and the properties of operations. Illustrate and explain the calculation by using equations, rectangular ar