Unplugged Lesson
Beginner
45 mins
Teacher/Student led
+50 XP
What you need:
IWB/Projector/Large Screen

Coding the Song: Repetition and Loops

Teacher Class Feed

Load previous activity

    1 - Introduction

    2 - Review Repetition in Music

    3 - Introduce Loops and Efficiency

    Explain that doing the same thing many times is a waste of effort for a programmer! Introduce the concept of a loop block. Explain that a loop is a special command that tells the computer: "Do this set of instructions again and again, without me having to write it out every time." This makes the code shorter and more efficient.

    4 - Demonstrate the Loop Block

    Draw a visual representation of the song's code on the board. Show the long sequence of SNAP cards you laid out previously. Now, draw a large circle or bracket around the SNAP command and label it "Repeat 4 Times". Explain that instead of saying "Snap, Snap, Snap, Snap," we can just say "Snap" and put it inside a Repeat Loop.

    5 - Code the Snapping Loop

    Have the students focus only on the repeating snaps. Lead them in performing the snap action four times quickly. Then, use the new Loop Concept: Give the command, "Repeat Snap four times!" Have them perform it again, understanding that the one command equals four actions.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more