Code a Dance Party

Featuring songs by:

Beyoncé, Miley Cyrus, BTS, Harry Styles, Nicki Minaj, Rosalía and more

Choose your Dance Party

Grades: 3-12

New

Dance Party: AI Edition

Learn about artificial intelligence (AI) concepts to create your own virtual dance party showcasing today's top artists. With dozens of songs to choose from, reach every student no matter their music taste. It's time to strut your stuff!

Start Dance Party: AI Edition

Grades: 2-12

Dance Party

In this introductory activity, use code to make a variety of colorful characters bust a move to animated backgrounds and upbeat music.

Grades: 2-12

Keep On Dancing

Go beyond the introductory tutorial with extended project ideas. Browse a library of examples of more complex dance parties.

Grades: 2-8

Dance Party Unplugged

Get your groove on—no computer needed! Learn how coding concepts, like events, can be used to synchronize dancer choreography.

Dance Party includes songs by:

Beyoncé • BTS • Harry Styles • Lizzo • Post Malone • Disney's "Encanto" • Rosalía • Nicky Youre • Lil Nas X • Jonas Brothers • FIFTY FIFTY • Steve Lacy • Panic! At The Disco • Shawn Mendes • Nicki Minaj • Pedro Capó • Sia • Ariana Grande • Avicii and Aloe Blacc • Calvin Harris • Carly Rae Jepsen • Coldplay • Ed Sheeran • Imagine Dragons • J Balvin and Willy William • Justin Bieber • Lady Gaga • Los del Río • Madonna • Mark Ronson (ft. Bruno Mars) • MC Hammer • Miley Cyrus • Selena Gomez • The Weeknd • Yolanda Be Cool • and more

Featured student projects

Start your Hour of Code with inspirational videos

Frequently asked questions

How does Dance Party: AI Edition work behind the scenes?

In Dance Party: AI Edition, three selected emojis are used to generate an output effect using AI. An output effect consists of values for background effect, background color palette, and foreground effect.

Each emoji and each output value has a descriptive phrase associated with it. By comparing the similarity of an input emoji's phrase with an output value's phrase, we are able to use AI to recommend the best match.

To compute the similarity, each phrase is assigned an embedding. An embedding is a list of numbers that captures the meaning of a phrase, and the embeddings used in Dance Party: AI Edition are about 1,500 numbers long. Similarity is measured by the "distance" between the phrases' embeddings. In Dance Party: AI Edition, we use embeddings generated by the Amazon Bedrock Titan model and calculate similarity by computing the cosine distance between embeddings.

The artists whose music are used in this tutorial are not sponsoring or endorsing Amazon as part of licensing use of their music to Code.org.