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

4.04: Exploring MartyPy Documentation

45 Minutes

Lesson Overview

In this lesson, students will further explore what different movements and functionalities Marty has. Students will start to explore the documentation available for MartyPy.

Key vocabulary:
    Library, Documentation,

Content Sections

  • Learning Objectives
  • warm-up
  • Get Learning
      • Wrap-up
      • Extensions & Challenges
      • Support
      • Extension
      • Additional Reading
      • 4.04: Exploring MartyPy Documentation

        45 Minutes

        Lesson Overview

        In this lesson, students will further explore what different movements and functionalities Marty has. Students will start to explore the documentation available for MartyPy.

        Key vocabulary:
          Library, Documentation,
        • Growing knowledge of Python commands, experience with technical manuals
        • Python compatible, with wifi enabled
          • Marty the Robot
          • Python Editor
          • Student Workbook
          • MartyPy documentation
          • Devices with Python and MartyPy

        Learning Objectives

        • I can describe code in terms of actions, purpose and parameters.
        • I can describe the usefulness of documentation when users write code.

        warm-up

        Ask if learners can recall anything interesting, challenging or funny, from the last lesson. Have them model the different movements they recall Marty making, challenge learners to make the movements with their own bodies, unless they are unable to do so, in which case have them model it on the available devices.

        Get Learning

        Remind learners of the importance of specific, unambiguous instructions, when giving them to a computer: remind them of what a person's interpretation means when instructions are given, with the examples of the robot drawings.

        Ask learners to recall some of the commands they used in the last lesson when moving Marty through a variety of poses. Then ask if they can remember what each of the parameters, within the parentheses, represented. It may be that they can recall some parts of the commands but not all parts of all the commands. Ask what they think would be good to have, in case programmers forget the exact use or parameters for different commands.

        Introduce 'libraries': in a general sense, ask learners what functions libraries serve for their communities. List the suggestions, the list might include:

        • they house books and, as a result, facts and knowledge
        • they group books on similar topics
        • they have books to explain, to instruct, to help us improve ourselves or encourage us to 'escape'.

        Share with learners that programming libraries hold specific information for specific functions to run. A library can hold pre-written code that can be called with a function. Libraries are often imported and the resources that are stored in the library are imported with them: when we set up Marty, last lesson, we did not write the program to make Marty walk; that was already written, we only had to type the command marty.walk() because the library had already done all of the hard work.

        Have learners think about the number of movements required to have Marty walk one step and think how long it would take a programmer to type that into a program each time they wanted to make Marty walk one or more steps. Have learners explore the other commands from the library and think about the number of individual commands that might exist within the library.

        Introduce 'documentation'. Documentation is what is used to explain what the library holds:

        • What commands does the library have?
        • What do the parts of each command mean?
        • What am I allowed to enter for each part?
        • How do I use the command, with all of the appropriate values?
        • Include images of the command in action, annotating the parts that are affected.

        As they go through the documentation, learners should record commands they think will be useful for later use and start to build up a document of their own. Be sure to encourage them to include key parameters and examples, with explanations for what learners will see when the command runs. In addition, encourage groups to think about useful additions they would suggest or try to write, themselves; include these in pseudocode, initially, but include useful information that would clarify the terms for another user.

        Wrap-up

        Bring learners back together, do a group share, discussing the commands they thought were useful and ones that could be added: combining movements into one new movement that learners think would be used often enough to warrant being in the library.

        Ask about challenges with learning and remembering the commands that are present in the library.

        Encourage learners to think about how they could share this information with a younger year group, or adults. Perhaps they could think about how to design a short workshop with a group class who haven’t used MartyPy yet and get the students to take lead on explaining and teaching others how to use it (with the help of their handbooks of course!) This would be for some future time.

        Extensions & Support

        Support

        Encourage all learners to illustrate the commands to better remember the code and the resulting action(s). Ensure that each command learners include has an example of the code and a description of what is happening, either short text or diagram.

        Extension

        Learners should think about new commands that should be included in the library but the developers didn't think about, consider the parameters for the command to be carried out effectively and ensure that there is documentation clearly describing the purpose of the command and how it works.

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