Computer Science Grade 2 20 min

Creating a Dance Routine Algorithm

Students create an algorithm for a simple dance routine.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define an algorithm as a set of instructions. Place instructions in the correct sequence. Identify a repeating pattern in a dance. Use a loop block to repeat dance moves. Create a short dance algorithm with 3-5 steps. Find and fix a simple bug in a dance sequence. Have you ever wanted to teach a robot how to dance? 🤖 Let's learn how! We will learn to give instructions, just like a computer. We will make a list of steps, called an algorithm, to create a cool dance routine. Let's get moving! 💃 Real-World Applications Following a recipe to bake cookies 🍪 Building a LEGO set using instructions 🧱 Your morning routine: wake up, brush teeth, get dressed ☀️ Playing a game like 'Simon Says' 🗣️
2

Key Concepts & Vocabulary

TermDefinitionExample AlgorithmA list of steps to finish a task. It's like a recipe for dancing!1. Clap 👏, 2. Stomp 🦶, 3. Jump 🙌 SequenceThe order that you do the steps. Order is very important!First you stomp, THEN you clap. Not the other way around. CommandOne single instruction or step. It tells the computer what to do.The command block could be 'Jump' or 'Spin'. SPIN ➡️ LoopA way to repeat steps over and over again. It saves you time!Instead of 'Clap, Clap, Clap', you can say 'Repeat Clap 3 times'. 🔁 BugA mistake in your algorithm. It makes your dance look silly!You wanted to stomp, but the robot wiggled instead. That's a bug! 🐛 DebuggingFinding and fixing bugs. You are a bug detective! 🕵️You see the robot wiggled. You change the...
3

Core Syntax & Patterns

Sequence Order Instructions happen one at a time, from top to bottom. Always put your dance move blocks in the order you want them to happen. The first block is the first move! Loop Power REPEAT [number] TIMES { DO [commands] } When you see a pattern, use a loop! Put the repeating moves inside the loop block.

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
The dance should be: Hop, Hop, Hop, then Spin. You have two code blocks: [Spin] and [Repeat 3 times: [Hop]]. What is the correct sequence for the blocks?
A.[Spin] -> [Repeat 3 times: [Hop]]
B.[Repeat 3 times: [Hop]] -> [Spin]
C.Put the [Spin] block inside the repeat block
D.Use only the [Spin] block
Challenging
A long dance is: [Wave, Kick, Wave, Kick, Twirl, Twirl, Twirl]. What is the SHORTEST way to write this algorithm using repeat blocks?
A.[Repeat 2 times: [Wave, Kick]] -> [Repeat 3 times: [Twirl]]
B.[Repeat 7 times: [Wave, Kick, Twirl]]
C.[Repeat 2 times: [Wave]] -> [Repeat 2 times: [Kick]] -> [Repeat 3 times: [Twirl]]
D.[Wave, Kick] -> [Repeat 5 times: [Twirl]]
Challenging
Your algorithm is [Repeat 2 times: [Jump, [Repeat 2 times: [Clap]]]]. What is the full sequence of moves?
A.Jump, Clap, Clap, Jump, Clap, Clap
B.Jump, Clap, Jump, Clap
C.Jump, Clap, Clap, Clap, Clap
D.Jump, Jump, Clap, Clap

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Sequencing and Algorithms: Giving Instructions

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.