Lesson Plan - Scratch
Introduction to
Loops
Code Playground
Nextpage
Introduction to loops lesson plan
Learning objectives Main activity
"I can explain what a loop is in computer What is a loop? What do we think a loop is used for in computer programming?
programming, where I might use one and for
what purpose” In computer programming, a loop repeats a section of code until a certain condition is met, so that we don’t
have to repeat ourselves or build long lists of the same code over and over again.
Pupils should be taught to design, write and
debug programs that accomplish specific Before the class put this into practice with Scratch, we can test this with dancing. For this part of the lesson,
goals, including controlling or simulating you will need to think of a dance routine that is both repetitive and familiar to the children. You could use:
physical systems; solve problems by • The Macarena
decomposing them into smaller parts • The cha-cha slide
• YMCA
“I understand the operation of a process and • The chicken dance
its outcome. I can structure related items of
• Gangnam style
information.”
Ask the children to work in pairs. One child should be the dancing robot and the other should be the
“I can demonstrate a range of basic problem
computer programme which tells the robot how to dance. Play a section of music that will allow the dance
solving skills by building simple programs to
routine to be played out at least twice and ask one child per pair to call out instructions to their partner for
carry out a given task, using an appropriate
the chosen dance routine until the music stops.
language.”
For the computer programmers, what was difficult about this activity? What could you change about the
programme to make it simpler? [e.g. repeat 4 times/repeat until music stops. This would be a loop.]
Resources There are loop blocks in Scratch that we can use to simplify our code. As a quick intro activity, ask the
• Laptops or desktop computers children to code their sprite to walk in a square. They may want to give their instructions out loud to their
• Music partner first, to help identify the repetition and where the loop is required.
• https://scratch.mit.edu
Can the children code their sprite to perform a basic dance routine using loops?
• Enough space to dance
Code Playground Previous |2| Nextpage
Introduction to loops lesson plan
Differentiation Plenary
Lower Ability/ASN Have the class play each other’s animations and give feedback
Use the Scratch flashcards to separate the loop blocks and motion blocks Did everyone use the same loop blocks?
that will be required for this lesson
More time can be spent on animating sprites to draw shapes to achieve
this outcome
Assessment Questions
Higher Ability/Extension Can you identify the three main loop blocks that we can use in Scratch?
Try making your sprite dance in time to music
What is the main purpose of a loop?
Can you use loops to make your sprite draw any other shapes?
Code Playground Previous |3| Nextpage