Skip to main content

Code a Dance in Scratch

Main Image
Information Technology

Learners develop pattern recognition skills and learn about repetition and events by using Scratch to code a dance.

What You Need

Guide:

Safety Notes

Ensure you are familiar with Let's Talk Science's precautions with respect to safe delivery of outreach to youth. 

What To Do

  1. Learners can work independently, or in groups of two to three. Ask educator to group learners, if applicable. 
  2. Learners access the website Scratch to create an account, new sprite and costume. Visit the Scratch Tips guide to teach learners how to do this. 
  3. Once an account, sprite and costume have been created, learners then perform the following tasks: 
    • Select one of the dancing sprites. 
    • Add events to trigger the next action and controls to control movements. 
    • Use the switch costume block to make the sprite change costumes and use motion blocks to make the sprite move. 
    • Alternate between change costume and wait blocks to make the movements. 
    • Use repetitions to make the dance routine. 
    • Add music, under the sound tab, and use wait blocks to time the movements to the music, if wanted. 

NOTE! If learners get stuck, direct them to the tutorial page (at the top) and/or encourage them to look at the animation for a suggestion of a code to start with. 

NOTE! Refer to Appendix A for an example of ‘dance’ code in Scratch. 

 

By trying to create a dance using Scratch, learners are using pattern recognition. Pattern recognition is the ability to recognize and use patterns to describe and represent sequences in data or processes. Learners also further develop critical thinking, testing and evaluation skills through this activity.

As technology advances, it is more important than ever that people contribute to the digital world. Building computational thinking skills, critical thinking, pattern recognition, testing and evaluating skills, better prepare learners for the real and the digital world. Being able to think critically is an important skill to have that helps learners become constructive citizens and interact with the world in meaningful ways.   

The dancing sprites, created by learners, may have had to repeat certain instructions, several times. This kind of repetition happens a lot in computer programming. Instead of writing out that step multiple times, it can be set up automatically, so it repeats or loops a certain number of times. An event involves having one action cause another action, such as how you get a computer to respond to the input of a user. User inputs include actions such as clicking a mouse, tapping a key or touching a screen. When learners wrote their code, they used an event such as ‘when the green flag is clicked’ to trigger another action. 

  • Encourage learners to remix their code, based on these questions:
    • Can you use a different event (e.g. when this sprite clicked) to trigger your sprite's dance? 
    • Can you use repetition (e.g. loops) to make your code simpler and more efficient?
    • Can you program a different sound to play for different parts of the dance sequence? 
    • Can you animate your Scratch project so that your sprite also sings while dancing? 
  • Encourage learners to add a background and set a scene for their dance. 
  • See Appendix A: Example of 'dance' code in Scratch (Activity Overview).

What's Happening?

By trying to create a dance using Scratch, learners are using pattern recognition. Pattern recognition is the ability to recognize and use patterns to describe and represent sequences in data or processes. Learners also further develop critical thinking, testing and evaluation skills through this activity.

Why Does it Matter?

As technology advances, it is more important than ever that people contribute to the digital world. Building computational thinking skills, critical thinking, pattern recognition, testing and evaluating skills, better prepare learners for the real and the digital world. Being able to think critically is an important skill to have that helps learners become constructive citizens and interact with the world in meaningful ways.   

The dancing sprites, created by learners, may have had to repeat certain instructions, several times. This kind of repetition happens a lot in computer programming. Instead of writing out that step multiple times, it can be set up automatically, so it repeats or loops a certain number of times. An event involves having one action cause another action, such as how you get a computer to respond to the input of a user. User inputs include actions such as clicking a mouse, tapping a key or touching a screen. When learners wrote their code, they used an event such as ‘when the green flag is clicked’ to trigger another action. 

Investigate Further

  • Encourage learners to remix their code, based on these questions:
    • Can you use a different event (e.g. when this sprite clicked) to trigger your sprite's dance? 
    • Can you use repetition (e.g. loops) to make your code simpler and more efficient?
    • Can you program a different sound to play for different parts of the dance sequence? 
    • Can you animate your Scratch project so that your sprite also sings while dancing? 
  • Encourage learners to add a background and set a scene for their dance. 
  • See Appendix A: Example of 'dance' code in Scratch (Activity Overview).