Activity 2-unit 2-update 2024. English translation
Coding io1-materials for teachers
1. ”
Teaching Method and
Flexible Tools
MATERIALS FOR TEACHERS
This project has been funded with support from the European Commission.
This publication reflects the views only of the author, and the Commission
cannot be held responsible for any use which may be made of the information
contained therein.
2. ”
Exercise / applications used for teaching coding for Primary
education; First stage of basic Education and Lower secondary
education; Second stage of basic education
Educator Lesson Plans
Materials, Resources and Preparation
● Review the Hour of Code Educator Guide and Best Practices from
Successful Educators to plan your Hour of Code event.
● Register your Hour of Code event to receive a thank you gift and fun
posters.
● Review the unplugged lessons and online tutorials available on
code.org/learn, and choose one to run with your students.
● If you’re running an online tutorial, 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.
● Print certificates to hand out at the end.
● Student engagement: 15-25 per facilitator, elementary or middle school,
no prior skill necessary.
3. ”
GETTING STARTED (2-5 MINS)
Introduce the activity (2-5 minutes)
Kick off your Hour of Code by inspiring students and discussing how
computer science impacts every part of our lives.
Show one of our inspirational videos to frame the discussion:
For older students, we recommend “Anybody Can Learn.”
It’s okay if both you and your students are brand new to computer science.
Here are some ideas to introduce your Hour of Code activity:
● Explain ways technology impacts our lives, with examples both boys
and girls will care about (Talk about saving lives, helping people,
connecting people, etc.).
○ 3D printing is being used to create limbs for amputees;
microchips to find lost pets; Skyping relatives who are far away
to keep in touch.
● Explain that learning computer science is more than learning to code in a
computer language, it's about learning how computers and software are
changing everything in our world.
○ Digital animation in movies like Inside Out, Shaun the Sheep,
Star Wars or Hunger Games; recording music with GarageBand
on your computer, mobile banking.
● Let students know that it's important to learn more about how
technology works regardless of what career they want to go into.
○ Farming (using data for watering and fertilizing), fashion
(programmable LED dresses at NYFW 2015), medicine (using
robots for surgery)
● As a class, list things that use code in everyday life, or a list of careers
the require knowledge of coding or computers.
● See tips for getting girls interested in computer science here.
4. ”
DIRECT STUDENTS TO THE ACTIVITY (1 MINUTE)
● Write the tutorial link(s) you’ve chosen on a whiteboard. Find the link
listed on the information for your selected tutorial under the number of
participants.
● Tell students to visit the URL and start the tutorial.
● Tip: For younger students, load the tutorial page ahead of time or save it
as a bookmark.
Activity (20-40 mins)
Facilitate and support students to complete the tutorial, alone or in
groups
When your students come across difficulties
It’s okay to respond:
● “I don’t know. Let’s figure this out together.”
● “Technology doesn’t always work out the way we want.”
● “Learning to program is like learning a new language; you won’t be
fluent right away.”
What to do if a student finishes early?
● Students can see all tutorials and try another Hour of Code activity at
code.org/learn
● Or, ask students who finish early to help classmates who are having
trouble with the activity.
Wrap-Up (5-10 mins)
Debrief & Close
● Debrief the activity.
● Celebrate and pass out certificates and stickers.
● Share photos and videos of your Hour of Code event on social media.
Use #HourOfCode and @codeorg so we can highlight your success, too!
Other ideas
● Do a gallery walk so students can see each other’s work.
● Do a “Think-Pair-Share” to allow students to reflect individually, discuss
with a partner and share out as a group.
● Let participants know they can continue to learn at
http://code.org/learn/beyond.
5. ”
Assessment/Extended Learning (2-5 mins)
Optional
Time permitting, challenge your students to reflect on the day’s activities and
continue their learning. Consider:
● Exit Ticket. Have students complete an Exit Ticket before leaving to
assess learning.
● Flip your classroom. Challenge students to pick one of the tutorials
they didn’t complete today, but that one of their friends did, and try to
do it on their own at home.
● Writing prompt. Have students journal at home about what they
learned and how it made them feel.
Beyond one hour
There are many ways to go Beyond an Hour of Code:
● Explore other curricula from our partners.
● Teach the Code Studio Computer Science Fundamentals courses.
Code.org offers free professional development for these courses, online
or in-person.
● Invite a computer science expert to your class. Sign up for a virtual
classroom
Kindergarten Hour of Code
Programming Concept Covered:Sequence
Estimated Time:45-50 Minutes
Objectives
Students will be able to explain what a programmer does.
Students will be able to use basic programming language to move a
“robot” forward, spin, and jump.
Vocabulary
Programmer - person that writes the code (language) that tells the
computer what to do.
6. ”
Code - The language that programmers use and create to tell computers
what to do.
Sequence - Sequence is one of three basic flow control structures in
programming, and is the very first concept a student must understand
when learning to code. Also known as order of events, a computer will
execute commands exactly in the order or sequence they are written. As
a programmer, it is important to make sure that the commands given to
a computer are in the right sequence, otherwise a program might not run
as expected.
Direct Instruction (I do)
Time:15 Minutes
Begin by introducing the concepts for lesson (programmer, programming
language, sequence). Give the definition of each on the board or chart paper to
have available for students to refer to during the class activity. Include visuals
to go with terms or have them anchored in the room for later reference.
Programmer:
T (ASK): “Who do you think is smarter, you or a computer?” Call on three
quiet hands to share their answers. “People are actually much smarter than
computers. In fact, computers can’t do anything without the people who are
telling them what to do. The people who tell computers what to do are called
programmers.”
Record on the board or chart paper: A programmer is a person who uses
code, or programming language, to tell a computer what to do.
T: “Can you share an example of something a programmer would make?” Call
on 3 quiet hands to share their answers. Most students will use games as the
example, but try to help them make connections to other things programmers
write code for (games, other programs you use at school, cars, airplanes,
space ships, iPads, phones).
“All of the games, programs, and things you just talked about are programs
created by programmers who tell the computer what to do. Programmers use a
special language called code, to create these things. Raise your hand if you
think it would be fun to create a game or program a space ship someday.”
Record on the board or chart paper: Programming Language is the
language, or code, that programmers use and create to tell computers
what to do.
7. ”
T: “Programmers use the code that they write to tell the computer EXACTLY
what to do. They have to tell the computer what to do in the right order, or it
won’t work correctly. This is also known as the order of events. A computer
executes the directions (commands) exactly in the order or sequence they are
written.”
ASK: “Think about washing your hands: We know that you need to put soap
on your hands, scrub, rinse, and dry them. What if we did it in a different
order, like scrub, rinse, soap, dry? Would our hands be clean and dry at the
end?”
“Sequence makes the computer correctly carry out the directions to make the
program work.”
Record on the board or chart paper: Sequence- the order that a computer
executes the directions written by the programmer. The computer will
follow the order or sequence exactly as they are written.
Guided Practice Activity
Students will act as programmers and apply basic knowledge of programming
language and sequence to command a robot to move forward and jump.
Time: 20-25 minutes
Activity Materials
1. White board, markers, smart board or other writing area that everyone
can see.
2. It is ideal to have another adult be the robot, but a student would be
another option if you don’t have a TA, assistant or room parent.
3. Floor space for the robot to move and for students to sit.
8. ”
Important! All robots must be told when to start either with a high five or by
saying “start” together as a class. Also, most robots are noise sensitive and
can’t function if there is a lot of noise in the room. ;-P
9. ”
Activity
Have students seated on the floor or rug area. Explain that the other teacher,
student, or parent is a robot, and that they need instructions from a
programmer. Review that computers aren’t as smart as people.
Explain that we want to program the robot to walk forward and jump.
Demonstrate this for them.
T: (Ask) “How do we walk?” (Acceptable response: with our feet, with our
legs) Discuss why we use our feet to walk. Ask everyone to show you their
right foot and left foot. Explain that we have to walk “right, left, right, left” so
that we don’t end up in the splits. “We need commands to tell our robot to
move their right foot and left foot, because our robot won’t know what to do
without instructions.”
Write the commands on the board, and explain why they look that way. (circle
to indicate which foot should stay still and arrow to indicate which leg to move)
T: (Ask) “What should we tell our robot to do first?” (Either right foot or left
foot forward) Write the program under “our code” with all commands
separated by commas. Ask for the second move.
T: (Ask) “Is this enough steps? How can we tell?” (students should want to
test the code)
Choose a student to high-five the robot to activate it. The robot will take two
steps forward and crash, then you can rewind it.
T: (Ask) “Oh no! Our robot crashed! Why did it crash?” (Because it needs
more code to complete the program)
Based on how big the steps are, determine how many more steps need to be
taken. Ask students how many more steps are needed. “If we’ve taken 2 steps
and we’re half way there, how many more do we need?”
When it is time to jump, ask the students, “How many legs do we use to
jump?” (they should say 2) You can demonstrate how silly it would be to jump
with one leg. Use 2 arrows pointing up to mean jump. Write the command and
then add it to the code.
Complete the program and run it.
10. ”
Celebrate! You're all programmers!
Optional: If you have time, you can ask for a “replacement robot”, because
yours is almost out of batteries. Choose a student to become the robot and run
the program.
Check for Understanding
Time:10 Minutes
T: Ask the class each question. Give 30 seconds for students to think and then
turn to share with their partner for 1 minute (Think, Pair, Share). Record
answers on chart paper to hang for later reference.
Review programmer, programming language, and sequence.
1. What is a programmer?
2. What is an example of a program?
3. How do computers or computer programs work?
4. What happens if we give the computer directions in the wrong order?
5. Who is smarter, computers or people?
Close the lesson by sending students to independently practice the
concept on their devices.
.
Required Materials
Chalk board, whiteboard, etc
Markers, chalk, etc
Floor Space
Kodable on Web, Desktop, iOS, or Android
11. ”
FOURTH GRADE HOUR OF CODE
Programming Concepts Covered: Sequence, Debugging, and Loops
Estimated Time:45-50 Minutes
Objectives
Students will be able to explain what a programmer does.
Students will be able to define sequence and how it relates to
programming
Students will be able to define loops and explain why they are necessary
in programming
Students will be able to use fractions, degrees, and programming
language, including loops, to move a “robot” forward, spin and jump.
Vocabulary
Programmer - person that writes the code (language) that tells the
computer what to do.
Code - The language that programmers use and create to tell computers
what to do.
Sequence - Sequence is one of three basic flow control structures in
programming, and is the very first concept a student must understand
when learning to code. Also known as order of events, a computer will
execute commands exactly in the order or sequence they are written. As
a programmer, it is important to make sure that the commands given to
a computer are in the right sequence, otherwise a program might not run
as expected.
Bug - An error or mistake in your code.
Debugging - The process of finding and correcting a mistake in your
code.
Direct Instruction (I do)
Time:15 Minutes
Begin by introducing the concepts for lesson (programmer, code, sequence).
Give the definition of each on the board or chart paper to have available for
students to refer to during the class activity. *Optional: Include visuals to go
with terms or have anchored in the room for later reference.
12. ”
Programmer:
T (ASK): "Who do you think is smarter, you or a computer? Explain your
answer giving reasons." Give students 1 minute to turn and discuss with their
partner. Call on 3 quiet hands to share their answers. "People are actually
much smarter than computers. In fact, computers can’t do anything without
the people who are telling them what to do. The people who tell computers
what to do are called programmers."
Record on the board or chart paper: A programmer is a person who uses
code, or programming language, to tell a computer what to do. (attach
visual of a person with a computer)
ASK: “Think about washing your hands: We know that you need to put soap on
your hands, scrub, rinse, and dry them. What if we did it in a different order,
like scrub, rinse, soap, dry? Would our hands be clean and dry at the end?”
"Sequence makes the computer correctly carry out the directions to make the
program work."
Record on the board or chart paper: Sequence- the order that a computer
executes the directions written by the programmer. The computer will
follow the order or sequence exactly as they are written.
“The last thing we need to think about before we program a robot together is
repetition. Repetition is the process of repeating the same task- sometimes we
repeat what we are doing when we want to save time and minimize mistakes.
For example, we may copy and paste something on a computer instead of
typing it out more than once. Programmers do this when writing their code to
make things go faster or to make sure mistakes aren’t made. This is called a
loop. In programming, loops are used to save time and make sure mistakes
aren’t made in the code.”
Say and record: Loops are commands that are used to repeat a portion
of code until a process is complete. Loops are essential to many
repetitive tasks often required in programming.
“Today, we are going to use our knowledge of sequence and loops to act like
programmers and move a ‘robot’ together.”
Guided Practice Activity
13. ”
Students will act as programmers and apply basic knowledge of programming
language and sequence to command a robot to move forward and jump.
Time: 20-25 minutes
Activity Materials
1. White board, markers, smart board or other writing area that everyone
can see.
2. It is ideal to have another adult be the robot, but a student would be
another option if you don’t have a TA, assistant or room parent.
3. Floor space for the robot to move and for students to sit.
Important! All robots must be told when to start either with a high five or by
saying “start” together as a class. Also, most robots are noise sensitive and
can’t function if there is a lot of noise in the room. ;-P
14. ”
Activity
Have students seated on the floor or rug area. Explain that the other teacher,
student, or parent is a robot, and that they need instructions from a
programmer. Review that computers aren’t as smart as people.
Explain that we want to program the robot to walk forward and jump.
Demonstrate this for them.
T: (Ask) “How do we walk?” (Acceptable response: with our feet, with our
legs) Discuss why we use our feet to walk. Ask everyone to show you their
right foot and left foot. Explain that we have to walk “right, left, right, left” so
that we don’t end up in the splits. “We need commands to tell our robot to
move their right foot and left foot, because our robot won’t know what to do
without instructions.”
Write the commands on the board, and explain why they look that way. (circle
to indicate which foot should stay still and arrow to indicate which leg to move)
T: (Ask) “What should we tell our robot to do first?” (Either right foot or left
foot forward) Write the program under “our code” with all commands
separated by commas. Ask for the second move.
T: (Ask) “Is this enough steps? How can we tell?” (students should want to
test the code)
Choose a student to high-five the robot to activate it. The robot will take two
steps forward and crash, then you can rewind it.
T: (Ask) “Oh no! Our robot crashed! Why did it crash?” (Because it needs
more code to complete the program)
Based on how big the steps are, determine how many more steps need to be
taken. Ask students how many more steps are needed. “If we’ve taken 2 steps
and we need to take six, how many more do we need” (4 more)
T: (Ask) “What is something we can use so that we don’t have to re-write
these commands over and over again?” (a loop)
Put arrows around the commands you want to repeat indicating that they will
be looped.
15. ”
T: (Ask) How many times do we want these commands to repeat. Optional:
use this opportunity to make the connection to multiplication.
Write “x3” next to the looped commands to tell the robot how many times they
should loop.
T: After the robot is getting to the correct spot, ask “Now what do we want our
robot to do?” (Turn around) “How are we going to tell it to turn around? What
shape do we make when we spin?” (a circle) “And which directions can we
spin? (left or right)
“Let’s use a circle and an arrow pointing right, to tell our robot to turn right,
and a circle and an arrow pointing left to tell our robot to turn left. Now which
direction do we want our robot to turn?” (either left or right) Write the code,
then test it again.
T: Instruct the “robot” ahead of time to do a complete turn instead of half a
turn. When the robot does the turn incorrectly, ask, “Uh oh! What happened?”
(Our robot turned too much) “Yes, we made a mistake. When you’re
programming is it okay to make mistakes?” (Yes!) “That’s right! A mistake in
your code is called a bug! And when we fix bugs in our code we are
debugging.”
Open up a discussion about doing a 1/2 turn rather than a whole turn. Use the
opportunity to tie in to fractions or degrees of rotation. Be sure to make the
change in your code by adding, “1/2 turn” or "180°" next to your spin
command. (pictured above) When the code is corrected, continue.
When it is time to jump, ask the students, “How many legs do we use to
jump?” (they should say 2) Use 2 arrows pointing up to mean jump. Write the
command and then add it to the code.
Complete the program and run it.
Celebrate! You're all programmers!
Optional: If you have time, you can ask for a “replacement robot”, because
yours is almost out of batteries. Choose a student to become the robot and run
the program.
16. ”
Check for Understanding
Time:15 Minutes
T: Ask the class each question. Give 30 seconds for students to think and then
turn to share with their partner for 1 minute (Think, Pair, Share). Record
answers on chart paper to hang for later reference.
Review programmer, programming language, and sequence.
1. What is a programmer?
2. What is an example of a program?
3. What do we call the language that programmers use to communicate
with computers?
4. How do computers or computer programs work?
5. What happens if we give the computer directions in the wrong order?
6. What happens if a programmer forgets a step in their directions?
7. What is a sequence? Why is sequence important?
8. What do programmers use to repeat portions of the code until a process
is complete?
9. What is one benefit of using loops?