Lesson 4: Dance Party: Unplugged

Grades K-2 | Grades 3-5 | Grades 6-8

Overview

Students will learn that events are a useful way to control when an action happens, and can even be used to make make multiple things act in sync. In programming, you can use events to respond to a user controlling it (like pressing buttons or clicking the mouse). Events can make your program more interesting and interactive.

Purpose

Students will learn to think about controlling actions using events. Events are widely used in programming and should be easily recognizable after this lesson.

Agenda

Warm Up (10 min)

Main Activity (25 min)

Wrap Up (5 min)

Go Viral!

Objectives

Students will be able to:

  • Respond to commands given by an instructor.
  • Recognize movements of the teacher as signals to start an action.
  • Keep track of actions associated with different events.

Preparation

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the Teacher

Vocabulary

  • Event - An action that causes something to happen.

Support

Report a Bug

Teaching Guide

Warm Up (10 min)

Vocabulary

flossing

This lesson has one new and important vocabulary word:

Event

An event is an action that causes something to happen.

Warming up to Events

  • Introduction
    • Today we're going to have a dance party! Does anyone have a favorite dance move?
    • Have you ever watched a dance team perform to music together? How do they stay in sync?
      • One way to do this might be to plan out all of the moves in advance. It's almost like the dancers are programmed! Computer scientists would call this an algorithm because it's a list of steps to get something done.
      • Another way to keep in sync is to have a cue that tells everyone when to change to a different move. Everyone would still need to know what moves to perform and agree on what the cues mean.
    • If I want everyone in class to clap at the exact same time, I could do that by giving you a countdown from 3. (Try it!)
    • When I reached "1", that was the event that gave you all the signal to clap.
  • Ask the class if they can think of any other events that could give signals.
    • You may need to remind them that you're not talking about an event like a birthday party or a field trip.
    • If they have trouble, you can remind them that an event is an action that causes something to happen.
      • Blowing a whistle
      • Waving a flag
      • Saying a magic word
      • Pressing a button
  • Today, we're going to organize our class dance party using events.

Main Activity (25 min)

Directions:

Dance Rehearsal

Lesson Tip

It is important to note that each move is performed continuously but also in left/right pairs. For example, when performing Clap High students will clap once to the left, then once to the right, then repeat that until the next move starts.

  • Project the Dance Moves Slides onto your classroom screen.
  • Practice each of the moves until students feel secure with them.
    • Consider expectations you might need to set around safety and personal space.
  • When you reach the last slide, decide with your class what each button does. We suggest:
    • Green Button -> High Clap
    • Orange Button -> Dab
    • Teal Button -> Star
    • Purple Button -> Body Roll
    • Pink Button -> This Or That
  • Practice tapping the buttons on the overhead and having your class react.
  • Let your class know that every time you push a button, it is an “event” that lets them know what they are expected to start doing next.

Dance Party

Lesson Tip

At the beginning, give enough space between button presses for students to perform the move in both directions a couple times. You can get faster over time.

  • Start playing some music.
  • Use the controller buttons to have class change dance moves while the music plays.

Extensions

Lesson Tip

Feel free to change up the music or to re-program each of your events. This is called iteration and it's a big part of what computer scientists do!

  • Mix up the dance moves using suggestions from the class. Encourage students to teach each other what they know.
    • If only a few students can perform a complex move, you can make them the lead dancers for a particular event.
      • For example, pressing one button might cause 3 students to start flossing while the rest of the class performs a body roll.

Wrap Up (5 min)

Flash Chat: What did we learn?

  • Why do we need to be able to handle events in a program?
  • What are some other kinds of events that you can think of?

Go Viral!

The Hour of Code is about creativity, and we can’t wait to see what you create! Please share student creations, photos, and videos on social media! Teachers, record your classroom coding a dance, or dancing the dance. Make your video special by adding an ending clip.

Be sure to include #HourOfCode and tag us on Facebook, Twitter and Instagram. Bonus points for tagging the artist whose music your students used. Code.org will re-share our favorite posts to our millions of followers. 🙂

Of course, make sure to respect your school's social media policy

  • Levels
  • 1
  • 2
  • (click tabs to see student view)
View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
  • 1A-AP-09 - Model the way programs store and manipulate data by using numbers or other symbols to represent information.
  • 1A-AP-11 - Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.

Cross-curricular Opportunities

This list represents opportunities in this lesson to support standards in other content areas.

Common Core English Language Arts Standards

L - Language
  • 2.L.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts, including using adjectives and adverbs to describe (e.g., When other kids are happy that makes me happy).
SL - Speaking & Listening
  • 2.SL.1 - Participate in collaborative conversations with diverse partners about grade 2 topics and texts with peers and adults in small and larger groups.
  • 2.SL.6 - Produce complete sentences when appropriate to task and situation in order to provide requested detail or clarification.

Common Core Math Standards

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

Next Generation Science Standards

ETS - Engineering in the Sciences
ETS1 - Engineering Design
  • K-2-ETS1-1 - Ask questions, make observations, and gather information about a situation people want to change to define a simple problem that can be solved through the development of a new or improved object or tool.
  • K-2-ETS1-3 - Analyze data from tests of two objects designed to solve the same problem to compare the strengths and weaknesses of how each performs.