Change Marty's Arguments to Change the Action

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.
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.
17 of 17 linked standards shown.
| Curriculum area | Linked standards |
|---|---|
| Digital Technologies, Design & technologies: Design & Technologies | |
| Digital Technologies, Design & technologies: Digital Technologies |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| General standards |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing | |
| Literacy & English: Listening and Talking | |
| Literacy & English: Writing | |
| Technologies: Computing Science |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| Computing, Design and Technology: Computing | |
| Computing, Design and Technology: Design and Technology |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| International Society for Technology in Education (ISTE) |
Select a code to read the full standard.
| Curriculum area | Linked standards |
|---|---|
| Elementary Technology Applications: Grade 3 to Grade 5 |
Select a code to read the full standard.
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.
Knowledge of block names
For this entire lesson, Marty should be on the ground, not on a table.
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.
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:
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.
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:
Carry out any end of lesson routines.
Log off devices and clear everything away.
See if you can shorten the code to make it easier to read but get Marty to the same place.
Open learning check