B4: Loops - Repeat X with Dash
Students will review their previous programming with Repeat Forever blocks and explore using the Repeat block to define a specific number of loops.

Lesson
Overview
Description
Students will review their previous programming with Repeat Forever blocks and explore using the Repeat block to define a specific number of loops.
Objectives
understand the difference between Repeat Forever and Repeat blocks
understand what problems are best solved with infinite loops (Repeat Forever blocks) and specified loops (Repeat blocks)
use loops to revise code and complete coding challenges in an iterative process
Before the Lesson
Prior Experience
It is recommended that students complete:
Level A Lessons: All
Level B: Lessons 1-3
[Optional] Level A Challenge Cards: All
[Optional] Level B Challenge Cards: B 1.1-2.3
You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://store.makewonder.com/#/education
Preparation
Fully charge the tablets and robots.
Install the Wonder Workshop Blockly app on each tablet.
Review
Loops Review
Briefly review how students used loops with Dot during the previous lesson by asking:
"What blocks did you use to program Dot last time?" (Sample responses: "light blocks" or "Repeat blocks.")
"Why did you need to use the Repeat block? How did the Repeat block help you improve your code?"
Remind students that Repeat blocks help create loops. A loop is when something repeats over and over again.
Blockly In-App Puzzle (Optional)
Have students complete the Dash the Snowman puzzle. You can find walkthroughs, solutions, and extensions for the puzzle there.
Have students update their Blockly Puzzle Checklists
Note: If previous puzzles are locked, show students how to quickly unlock them using this strategy: https://help.makewonder.com/customer/en/portal/articles/2318965-how-can-i-reset-challenges-unlock-free-play-or-unlock-wonder-cloud-?b_id=14312
Code.org Connections (Optional)
Show Code.org's video about repeats and loops.
After watching the video, ask:
"Have you used Repeat blocks in Code.org before?" (Sample response: "I used Repeat blocks to collect gems with Collector.")
"How did the Repeat blocks help your code?" (Sample response: "Repeat blocks let me repeat shapes in Artist.")
Direct Instruction
Introduction
Project your tablet screen and open the Blockly app.
Go to the Control menu and point at the Repeat Forever and the Repeat block. Say, “You used the Repeat Foreverand the Repeat block with Dot in the last lesson. When should you use the Repeat Forever block?”
Sample response: “You use the Repeat Forever block when you want the loop to never stop.”
Ask the class, “When should you use a Repeat block?”
Sample response: “You use the Repeat block when you want the loop to stop after a specific number of times.”
Say, “Today, we are going to try using the Repeat block with Dash. When would you want Dash to repeat something a specific number of times?”
Sample response: “When I want Dash to turn right only 3 times.”
Quick Check
What is a loop?
When would you like to repeat something a specific number of times?
Where do you find the Repeat Forever and the Repeat blocks in Blockly?
Guided Practice
Activity: Square Dance
Open the Blockly app and go to the menu at the top left of the screen.

Go to the Create New Project menu and select the Square Dance preset program. Then tap "create."

Say, "Dash is going to do a dance for us! Let's see how Dash uses loops in the dance."
Play the program again and have students share what they notice. (Sample response: "Dash made a square!")
Select a student volunteer to point out the Repeat block in the program.
Ask, "What would happen if you changed the number of times Dash repeated the dance?"
Have students take turns sharing their guesses. (Sample response: "Dash would make another square.")
Tap on the Repeat block and change the number of repeats from 4 to 6.
Play the program again and have students share what they notice. (Sample response: "Dash made a square and then moved 2 more times!")
Quick Check
How many times did Dash do the Silly dance in this program?
If you wanted Dash to make 3 squares in the dance, how many times would Dash need to repeat these blocks?
Independent Practice
Instructions
Have students work on the following activities in small groups (ideally 2-3 students per robot).
Encourage students to share tablet and robot time. Have them establish and rotate through roles such as:
Lead Programmer: Holds the tablet and manipulates the code.
Robot Wrangler: Retrieves and resets the robot after every program attempt.
Documentarian: Records group results, thoughts, and progress. Illustrates group designs and ideas.
When students work together while coding, they're able to help each other identify mistakes and develop creative solutions!
Square Dance Extension
Have students use the Wonder Journal: Dash Planning or General Planning worksheet to design ways to add to or alter the Square Dance preset program. They can:
Change the number of loops.
Change the dance that Dash performs at each corner.
Add more sounds or lights.
Add another loop to the dance.
Change the angle of the turns to create a new shape.
After they finish revising the program, have students:
Complete a Wonder Journal: Reflection worksheet.
Take a screenshot of their Blockly code.
Take a video of Dash while the code is running.
Challenge Cards
You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://logicsacademy.com/store/
Have students complete the following Challenge Cards:
B 2.4: Littered Lake
B 2.5: Recycling Rush
B 2.6: Dash's Trash
For each challenge, encourage students to:
Use the Wonder Journal: Dash Planning or General Planning worksheet to discuss how they can complete the challenge.
Review the Troubleshooting and Problem Solving & Debugging worksheet if they run into any problems with their code.
After they finish each challenge, have students:
Complete a Wonder Journal: Reflection worksheet.
Take a screenshot of their Blockly code.
Take a video of Dash while the code is running.
Update their Challenge Card Checklists.
Wrap Up
Student Presentations
Have student groups take turns sharing one of their programs with the class. Encourage them to:
Explain their design thinking (e.g., "We wanted to add (sounds) to the program because . . .", "We used the Repeat block here to solve the challenge because . . .").
Share any obstacles and difficulties they overcame during the activity (e.g., "At first, we didn't know how to make Dash (push more than one cup), but then we used a Repeat block with our code.")
Encourage students to ask each other how they accomplished different objectives and give each other feedback on their programs. Possible questions/feedback includes:
"How did you (program Dash to dance like that)?"
"I like how you (added lights and sounds to your program)."
"What if you (recorded a sound for your program)?"
Follow-Up Questions/Discussion
How did the Repeat block help you with your program?
How did loops help you complete the challenges?
What if you used the Repeat Forever block instead of the Repeat block? How would that have changed the program?
Assessment
Use our Evaluation Rubric to review students' work and presentations.
[Optional] Share your students' work with the world using @logicsacademy and #dashanddot!
Educational Standards
CSTA
CSTA
1A-AP-10: Develop programs with sequences and simple loops, to express ideas or address a problem.
1A-AP-11: Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.
1A-AP-12: Develop a plan that describes a program’s sequence of events, goals, and expected outcomes.
1A-AP-14: Debug (identify and fix) errors in an algorithm or program that includes sequences and simple loops.
1A-AP-15: Using correct terminology, describe steps taken and choices made during the iterative process of program development.
ISTE
ISTE
4d: Exhibit a tolerance for ambiguity, perseverance, and the capacity to work with open-ended problems.
5a: Formulate problem definitions suited for technology-assisted methods such as data analysis, abstract models and algorithmic thinking in exploring and finding solutions.
6b: Create original works or responsibly repurpose or remix digital resources into new creations.
7c: Contribute constructively to project teams, assuming various roles and responsibilities to work effectively toward a common goal.
NGSS
NGSS
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-2: Develop a simple sketch, drawing, or physical model to illustrate how the shape of an object helps it function as needed to solve a given problem.
Common Core
Common Core
CCSS.ELA-LITERACY.W.2.8: Recall information from experiences or gather information from provided sources to answer a question.
CCSS.ELA-LITERACY.SL.1.1: Participate in collaborative conversations with diverse partners about grade 1 topics and texts with peers and adults in small and larger groups.
CCSS.ELA-LITERACY.SL.1.2: Ask and answer questions about key details in a text read aloud or information presented orally or through other media.
Alberta - Grade 1 - ICT
Grade 1
ICT
C5: Students will use technology to aid collaboration during inquiry.
C6: Students will use technology to investigate and/or solve problems.
F6: Students will demonstrate a basic understanding of the operating skills required in a variety of technologies.
Ontario - Grade 1 - Mathematics
Grade 1
Mathematics: Algebra (Coding)
C3.1 solve problems and create computational representations of mathematical situations by writing and executing code, including code that involves sequential events
Nova Scotia - Grade 1 - ICT
Grade 1
ICT
Outcome 5: Students will be expected to, with teacher assistance, use grade-appropriate digital tools to explore ideas, create original works, and represent their learning, both individually and collaboratively.
Outcome 9: Students will be expected to, with teacher assistance,
use grade-appropriate ICT terminology
follow verbal instructions and visual reminders to begin safely operating computers and grade-appropriate digital devices
British Columbia - Grade 1 - ADST
Grade 1
ADST
• Use trial and error to make changes, solve problems, or incorporate new ideas from self or others
• Develop their skills and add new ones through play and collaborative work
