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.13 – Teaching Marty How to Walk

45 Minutes

Lesson Overview

So far, students have been using the built-in command for getting Marty to take steps forwards and backwards. However, in this lesson we will create a program to get Marty taking steps without using the built-in command. Students will focus on breaking down how they walk in terms of balancing and where they shift their weight with each step.

Key vocabulary:
    Walking , Joints , Movement , Balancing , Weight , Command , Function,

Content Sections

  • Learning Objectives
  • Extensions & Challenges
    • Additional Reading
    • 1.13 – Teaching Marty How to Walk

      45 Minutes

      Lesson Overview

      So far, students have been using the built-in command for getting Marty to take steps forwards and backwards. However, in this lesson we will create a program to get Marty taking steps without using the built-in command. Students will focus on breaking down how they walk in terms of balancing and where they shift their weight with each step.

      Key vocabulary:
        Walking , Joints , Movement , Balancing , Weight , Command , Function,
      • Lessons 1.1-1.12
      • Laptop, PC or Tablet
        • Marty the Robot
        • Marty Workbook (Lesson 4)
        • Laptops/Computers/Tablets
        • Access to the Scratch editor

      Learning Objectives

      • Breakdown and describe how we walk in terms of balancing and individual movements
      • Program Marty to walk without using the built-in command
      • Make use of functions, parameters, loops and if statements appropriately to create a walking program for Marty

      1. Start off by getting students to think about how they walk by breaking down the action into small steps and thinking about balance and whether they shift their body weight to a specific side

      2. Can students program their friends to take one step forwards using only the instructions given in their workbooks/slides?

      3. Moving into small groups with a device and a Marty, get students to try and translate the instructions they just gave each other to get Marty to take one step forwards with his right leg

      4. Then again with his left leg

      5. Ask students whether they can use something to stop repeating the blocks for each left and right step

      a. Functions! Students should create two functions: one for stepping with the right leg and one for stepping with the left leg

      6. Then create a loop that calls both of these, but do students notice how many steps Marty takes per loop or iteration?

      a. He currently should be taking two steps each time we go around the loop but what if we only want to take 1 step? We need to keep track of the last foot we stepped with

      b. Using a variable, each time we call step left or step right, update the variable to hold either “left” or “right” and check to decide which function should be called

      c. Place this code in a function called step

      d. Then whenever we call step in our main sequence of blocks, we will be able to get just one step!

      Extensions & Support

      • See if students can create something similar to get Marty to kick either his left or right leg or any other actions that they can break down
      • Get students to think up some yoga poses and see if firstly they think Marty will be able to do them and then recreate them in Scratch to get students to continue thinking about weights and balancing

      Additional Reading

      • Educator’s Guide
      • Introduction to Programming with Marty using Scratch