How to use the
Learning Portal

Learning Portal

Our hands-on, comprehensive lesson plans span a range of levels. Browse our free STEM and coding learning resources.

Marty Image

1.04: Let's Do That Again

60 Minutes

Lesson Overview

Learners already know that you can change the arguments for applicable blocks, which eliminates the need to use multiple copies of the same block. The repeat block (loop) allows for the repetition of one or more action eliminating the need for repeating a sequence of blocks that you want to loop.

Key vocabulary:
    Loops , Repetition ,

Content Sections

  • Learning Objectives
  • Warm up
  • Get Learning
    1. Unknown block type "youtube", please specify a serializer for it in the `serializers.types` prop
      Unknown block type "youtube", please specify a serializer for it in the `serializers.types` prop
    2. Time for Practice
    3. Unknown block type "youtube", please specify a serializer for it in the `serializers.types` prop
      • Cool Down
        • Extensions & Challenges
        • Extend
        • Support
        • Additional Reading
        • 1.04: Let's Do That Again

          60 Minutes

          Lesson Overview

          Learners already know that you can change the arguments for applicable blocks, which eliminates the need to use multiple copies of the same block. The repeat block (loop) allows for the repetition of one or more action eliminating the need for repeating a sequence of blocks that you want to loop.

          Key vocabulary:
            Loops , Repetition ,
          • Knowledge of block names
          • iPad or Tablet with MartyBlocks Jr
            • Marty the Robot v2
            • Tablets
            • Access to the MartyBlocks Jr editor

          Learning Objectives

          • I can describe an action that has different parts.
          • I can create a block of code that causes the instructions inside to repeat.

          For this entire lesson, Marty should be on the ground, not on a table.

          Warm up

          Share with learners the learning objectives and success criteria for the lesson, from the presentation file.

          Read the story text from the resources section or in the presentation slides. Notes have been added to support the flow.

          Ask learners what they can remember about having an action occur more than once. This was explored in the lesson on parameters and arguments - when you change the number value for steps in whichever direction you have, that many steps will be taken. Ask learners what might happen if I wanted to take 5 steps how could I tell Marty to do that?

          The video in the presentation illustrates the blocks and how Marty looks.

          What if I wanted to have Marty take a step forward and a step to the side 5 times?

          Illustrate the next slide of the presentation showing 5 forward steps and 5 sidesteps and Marty moving. Ask if that is what was wanted. Learners should say, "No, you want a forward steps and then a sidestep and to do that 5 times."

          Share with learners ideas for what routines repeat: Music and dance could be suggested but so are bigger things, like getting ready for school. We do the same thing most mornings. Have learners think about other instructions that Marty might like to repeat.

          Get Learning

          Have learners watch the following video clip that has 7 basic steps:

          Stop after the dance moves repeat because the dance then goes into reverse unless you want to look at both ways the dance can be performed. Repeat the initial sequence as needed. If you allow the backwards and forwards view of the dance, be prepared for learners to present the order of dance steps in either direction: 1 to 7 or 7 to 1.

          • 4 steps forward
          • 1 step to the side, jump clap
          • 1 step to the other side, jump clap
          • turn to the side and put arms out
          • shake shoulders
          • turn to the other side and put arms out
          • shake shoulders again

          Have them watch for the order of the steps and how many times they repeat. Then have them complete the workbook page to put the actions in order.

          The second video features a musical ostinato. The repeating sequence is D, C, B flat, A. The four colors for the keys on the keyboard repeat throughout the whole of the piece (blue, dark green, violet, apple green). If learners watch carefully, they can see these four notes repeat as the other music is playing.

          The following slide will show one step forward and one to the side, repeated 5 times. This is better but takes a long time to write and a long time to read. Tell learners that today we will be working with a block that lets us repeat more than one action so that we can make a sort of routine.

          show just the code in MartyBlocks Jr with Marty's movements

          Have learners think about the benefit of using a block that lets us repeat an action in code. It will take less time to write, it will take up less space on the page, I can easily see how many times something will happen, etc.

          Time for Practice

          Share with learners a very basic example of an action that repeats, without a loop.

          The code is in the presentation

          Have learners describe the parts that repeat. Then, show a repeat block being applied that eliminates the need to duplicate the blocks on the workspace.

          again, show the just code of Marty in action - the video is below.

          Ask learners to model / describe what they think the code will do, for Marty:

          • Marty puts one foot forward (in)
          • Marty puts one foot back (out)
          • Marty puts one foot forward
          • Marty dances (shakes it all about)

          Talk with learners about the difference between the two instruction samples: the output is the same (in the short term), the code blocks used (apart from the repeat block) are the same, the number of blocks used is different. There is a slide with both collections of code blocks side by side.

          Discuss with learners what they think Marty could do, making use of the loop block - a dance move, a drama (mime of an action), some other routine. Give learners time to discuss and plan movements they know that can be repeated.

          Cool Down

          Bring learners back together to discuss the challenges they faced and overcame. Have groups model their creations and explain what is happening, when. Encourage questions about differences between the design of different groups' code. If a group chose to explore any extension activities, allow for time to explain this.

          Suggested questions you might ask:

          • Which interesting combinations did you create? What movement is Marty performing?
          • Were there any problems you discovered with the repeat block you used? It never stopped - this was the repeat forever block.
          • Do you think it is a good idea to use this block to improve your code or would you prefer not to use it? Why? Learners may say it wasn't good because it didn't stop but it did take away the need for so many code blocks.

          Carry out any end of lesson routines.

          Log off devices and clear everything away.

          Extensions & Support

          Extend

          Have learners think about how they might have two Martys use different repeat blocks to create a routine together: as one takes 3 steps forward, the other takes three steps back; as one takes three steps to the right, one takes three steps to the left, etc.

          The discussion should be timed properly: starting at the same time and keeping the movements synchronized.

          Support

          Take time to repeat the steps that make up an action. Display some ideas to groups, depending on the ideas that learners suggest. Ask for whole-class support in breaking down the steps and either illustrate them or use text to describe them for groups to consult.

          Additional Reading

          • Marty the Robot Educator Guide
          • Educator FAQ

          • Technologies: Computing Science
          • Literacy & English: Listening and Talking
          • Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing
          • Literacy & English: Writing
          • Computing, Design and Technology: Design and Technology
          • Computing, Design and Technology: Computing
          • CSTA Education Standards
          • Elementary Technology Applications: Grade 3 to Grade 5
          • Digital Technologies, Design & technologies: Design & Technologies
          • Digital Technologies, Design & technologies: Digital Technologies
          • International Society for Technology in Education (ISTE)