2: Learning to Code with Marty Blocks Jr
Step 3 of 4: 1.04: Let's Do That Again
Learn how loops work and program Marty to repeat moves again and again and again...
19 of 19 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 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.
Knowledge of block names
For this entire lesson, Marty should be on the ground, not on a table.
| Timing | Activity | Possible adaptations |
|---|---|---|
| — | Warm upShare 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. | — |
| Timing | Activity | Possible adaptations |
|---|---|---|
| — | Get LearningHave 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.
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 uses a short repeating musical pattern, called an ostinato, from the theme of Final Fantasy VII. Ask learners to listen for the repeating pattern. They can tap or clap along each time it returns. Discuss how repeating a musical pattern is similar to using a repeat block in code. |
| Timing | Activity | Possible adaptations |
|---|---|---|
| — | Cool DownBring 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:
Carry out any end of lesson routines. Log off devices and clear everything away. | — |
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 Blocks 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 PracticeShare 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:
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. | SupportTake 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. |
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.