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.03: An Argument with Marty

45 Minutes

Lesson Overview

Learners know that adding a duplicate block copies an action: two forward arrow blocks cause Marty to take two steps. In this lesson, learners will discover the part of a block that contains an argument, which modifies how many times a block is carried out.

One thing to note is that the maximum number for any argument is 20.

Key vocabulary:
    Argument, Efficient,

Content Sections

  • Learning Objectives
  • Warm up
  • Get Learning
  • Unknown block type "youtube", please specify a serializer for it in the `serializers.types` prop
    Unknown block type "figure", please specify a serializer for it in the `serializers.types` prop
  • Time for Practice
  • Cool Down
    • Extensions & Challenges
    • Extend
    • Support
    • Additional Reading
    • 1.03: An Argument with Marty

      45 Minutes

      Lesson Overview

      Learners know that adding a duplicate block copies an action: two forward arrow blocks cause Marty to take two steps. In this lesson, learners will discover the part of a block that contains an argument, which modifies how many times a block is carried out.

      One thing to note is that the maximum number for any argument is 20.

      Key vocabulary:
        Argument, Efficient,
      • 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 say what an argument is, for a program.
      • I can decrease the amount of code I write by changing an argument.

      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.

      The video near the end of the story text, in the presentation, illustrates an argument changing in a set of instructions.

      Get Learning

      Ask learners if they have ever had an argument with a friend or a brother or sister. Is that the kind of argument that Marty had to find out about?

      Now have them think about the other kind of argument, the argument that changes one step in an instruction. Have they ever done something with this kind of argument. If no one says they have or no suggestions were offered, ask about when they brush their hair or teeth, do the brush only once? How about eating a sandwich, do they only need to take one bite? When they wash their hands, do they only rub their hands together one time? Ask learners if they can think of any other instructions that require them to do one thing more than once.

      Have learners complete the activity in their workbooks that gives an estimate of the number of times a one action task should be carried out. This will give learners an idea of the benefit of using arguments in instructions.

      Show learners the code for Marty completing a task that requires two separate actions, this is after the last slide of the story, from the presentation. The example displays several blocks, because of the number of times an action is carried out. The following slide, in the presentation, shows Marty completing the actions from the code. Here is the same video.

      The code that makes use of different arguments is not in the presentation but have learners think and talk about what they could do to make the longer code easier to read. Here is what they might suggest:

      Time for Practice

      Learners need to think of an action that Marty can complete that requires more than 3 separate blocks: walk forward, wave, change expression, for example. Learners need to plan for Marty to complete a movement/task with these 3+ blocks: they need to think about how far they need to move and when the different blocks make sense, in the sequence. Have them write these into their workbooks with a sensible sequence and argument for each block.

      Encourage learners to mime the movements they would want Marty to perform with others, in the group, noting down the actions and how often they occur. If learners cannot think of a movement to mime, here are a few suggestions they could plan for Marty: a dance sequence - side-stepping, arm raising, eyebrow expression or sound; washing windows/painting - side-stepping, raising one arm then the other, sounds to indicate effort; going for a walk and calling/waving to friends; putting the shopping away; typing on a keyboard; posing for a photo.

      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.

      Suggested questions you might ask:

      • How much time do you think you could save by changing the argument compared to adding more blocks?
      • If you had to go shopping, would it be easier to remember to get a banana and another banana and another banana and another banana and another banana or would it be easier to remember to get 5 bananas?
      • The same thing in a reading book, would you rather read that a character climbed a tree and then another tree and then another tree and then another tree and then another tree or that he climbed 5 trees?
      • This is one of the reasons why we have arguments, in code.

      Carry out any end of lesson routines.

      Log off devices and clear everything away.

      Extensions & Support

      Extend

      Have learners bring together all the benefits that changing an argument brings. They might choose to organise the benefits into different categories: time, readability, correcting mistakes / debugging. Have groups present their ideas to the class and display their finding to encourage learners to modify the arguments for blocks, rather than adding duplicate blocks, for future learning.

      Support

      Link arguments to multiplication: when the argument is 1, the block code runs 1 time; when 2, the code runs 2 times; 3, 3 times; etc. This should help learners to see that the number doesn't change how often the block runs, just that it changes the number of times the block runs.

      Illustrate with number sentences for them to see: 1 + 1 + 1 + 1 is the same as 4 x 1.

      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)