← Back to Library
Lesson PlanFreeFR

(Francais) E1: Loops - Repeat Until Loops

Level E, Lesson 1: Students will learn how and why to use Repeat Until blocks. They will use Blockly preset programs and Challenge Cards to practice their new skills. Objectives Students will: Identif

(Francais) E1: Loops - Repeat Until Loops

Educational Standards

CSTA

ISTE

NGSS

Common Core

Wrap Up

Student Presentations

  1. 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 animations to our program because we wanted to make Dash dance,” or “We used the Repeat Until block/s to control how Dash repeats each dance move.”)
    • Share any obstacles and difficulties they overcame during the activity. (E.g., “At first, we weren’t sure why we should use a Repeat Until block, but then we realized it gave us more control over our program. ”)
  2. 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 (use cues in your program)?"
    • "I like how you (changed the lights and sounds in your program)."
    • "What if you (added another event handler for Dot)?"

Follow-Up Questions/Discussion

  • How were the Repeat Until blocks used in this program?
    • Sample response: "The Repeat Until blocks allowed Dash to repeat a series of behaviors placed inside the Repeat Until block. The behaviors continued until an assigned behavior told Dash to stop or do something different."
  • What would life be like if you only used Repeat X Times or Repeat Forever loops?
    • Sample response: “When you are hungry, you put food in your mouth and Repeat Until you are full. If you used a Repeat Forever block you would never stop eating. If you used a Repeat block you might not get enough to eat or eat too much.”
  • If you lived in a world where your entire life needed programming, in what situations would you need to use a Repeat Until block?
    • Sample response: "I would use a Repeat Until block for my homework. I would repeat the work until it was complete."

Assessment

  • Use our Evaluation Rubric to review students' work and presentations.
  • [Optional] Share your students' work with the world using @logicsacademy and #dashanddot!

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!

Hide and Seek Extension

  1. Have students use the Wonder Journal: Dash Planning, Dot Planning, and/or General Planning worksheets to design ways to add to or alter the Hide and Seek preset program. They can:
    • Change the cues for Dash.
    • Change and/or add more lights, looks, or sounds.
    • Add more drive blocks.
    • Change the event handler.
  2. 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 and Dot while the code is running.

Challenge Cards [Optional]

  1. You can purchase our Learn to Code Challenge Card sets and Curriculum Guide here: https://logicsacademy.com/store/
  2. Have students complete the following Challenge Cards:
    • E1.1: Rootin' Tootin' Line Dance
    • E1.2: Dance Along with Dot
    • E1.3: Dance Machine Dash
  3. For each challenge, encourage students to:
    • Use the Wonder Journal: Dash Planning, Dot Planning, and/or General Planning worksheets 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.
  4. 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 and/or Dot while the code is running.
    • Update their Challenge Card Checklists.

Instruction

Introduction: Hide and Seek

  1. Project your tablet screen, open the Blockly app, and go to the menu at the top left of the screen.
  2. Go to the Create New Project menu and select the Hide and Seek preset program. Then tap "create."Hide and Seek
  3. Ask the students to look at the program and predict what they think will happen when it is run.
    • Run the program to see if the students' predictions were correct.
  4. Point to the Repeat Until block in the program and say, "This is a new kind of repeat block. With this block, Dash or Dot will repeat what's inside the loop until a specific event happens."
    • Ask the class, "What action will Dash repeat until there is an Obstacle in Front?" (Sample response: “Dash will look for Dot. Then Dash will move forward.”)
    • Ask the class, “What will happen when Dash sees an Obstacle in Front?"(Sample response: “Dash will look left.”)

Quick Check

  • What events are used for the Repeat Until blocks in this program? Why do you think the programmers chose those events?
  • Could you have used a Repeat Forever block to play the hide and seek program? Why or why not?

Review

Loops Review

  1. Briefly review with students the definition of and uses for loops by asking:
    • What are loops? (Sample response: "The action of doing something over and over again.")
    • Why do we use loops in coding? (Sample response: "We use loops to make our codes more efficient and easier to write.")
  2. Say, "You have learned about different types of loops: Repeat Forever and Repeat loops. Compare and contrast the two different types of loops."
    • Sample response: "Repeat loops repeat a specific number of times, while Repeat Forever loops repeat until the user tells them to stop."
  3. Give an example of when each type of loop is used in real life, such as:
    • A Repeat loop: You put on one sock and repeat this action a second time.
    • A Repeat Forever loop: You breathe in and out. You repeat this action over and over again unless someone tells you to hold your breath.

Blockly In-App Puzzle [Optional]

  1. Have students complete the Dance Contest puzzle. You can find walkthroughs, solutions, and extensions for the puzzle.
  2. Have students update their Blockly Puzzle Checklists
  3. 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]

  1. Review Code.org's Course D, Lesson 8: https://curriculum.code.org/csf/coursed/8/
  2. Say, "In this activity, you were able to help the farmer plant using Repeat blocks."
    • Then ask, "How would your code have looked different if you had not been able to use Repeat blocks?" (Sample response: "The code would have been much longer.")

Quick Check

  • What are the advantages of using loops in code?
    • Sample response: "Using loops makes our code faster and more efficient to write."
  • In what situation would you want to use a Repeat loop as opposed to a Repeat Forever loop?
    • Sample response: "When writing your code, you use a Repeat loop when you want something to repeat a set number of times. You use a Repeat Forever loop when you want something to repeat until the program stops."

Guided Practice

Hide and Seek Exploration

  1. Ask the class, "How can we change the code so that Dash looks for Dot until we press the Top Button?"
    • Select a student volunteer to change the code by tapping on the Repeat Until block and selecting the Top Button icon.
    • Then run the program so the class can see how the program has changed.
  2. Continue selecting student volunteers to change the Repeat Until block in a similar manner. Encourage students to:
    • Change the Repeat Until event to Hear Clap or Object Behind.
    • Change the blocks inside the Repeat Until block.

Quick Check

  • What are the different kinds of events you could use for the Repeat Until block?

Before the Lesson

Prior Experience

It is recommended that students complete:

  • Level A-D Lessons: All
  • [Optional] Level A-D Challenge Cards: All

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.