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

2.3 – Introducing Python

45 Minutes

Lesson Overview

Students will begin interacting with the Python shell so that they can play around with running different commands to control Marty before playing a short game so that they begin to get comfortable with using Python. In this lesson, we will be focusing on using the IDLE program to access the Python shell before creating some small scripts.

Key vocabulary:
    Python , Shell , Commands , IP Address , Instructions,

Content Sections

  • Learning Objectives
  • Extensions & Challenges
    • Additional Reading
    • 2.3 – Introducing Python

      45 Minutes

      Lesson Overview

      Students will begin interacting with the Python shell so that they can play around with running different commands to control Marty before playing a short game so that they begin to get comfortable with using Python. In this lesson, we will be focusing on using the IDLE program to access the Python shell before creating some small scripts.

      Key vocabulary:
        Python , Shell , Commands , IP Address , Instructions,
      • Education Level: Second/Third Level (Age 9-13)
      • Laptop or PC
        • Marty the Robot
        • Marty Workbook (Lesson 3)
        • Laptop or PC with Python and MartyPy installed
        • Access to IDLE editor on programming device
        • Marty Says cards
        • Marty movement dice
        • Printed Python commands

      Learning Objectives

      • Become familiar with the IDLE editor so that students can start the program and interact with the Python shell
      • Describe how to connect to a Marty
      • Use Marty commands from the MartyPy library to control Marty

      1. Prior to the lesson, make sure that student programming devices have Python, MartyPy and IDLE installed

      2. Break students up into small groups of around 2-3 students, where each group has a copy of the printed Python commands

      3. Show some of the different Scratch blocks and ask students to hold up the corresponding Python command

      4. Ask students to move onto IDLE, the first screen that appears is the Python shell which we can interact with directly, but first we need to connect our Marty’s – students may need guided through this (if unsure, follow the getting started with Python for schools guide!)

      5. Get students to try using the printed commands to help them go through a few some of the Marty Says cards and get Marty moving

      6. Talk students through how to create a Python file on IDLE and run it

      7. Students should now put into practice what they have covered by using the movement dice

      a. Student groups should race to see who can be the first to solve all of the challenges on the dice (making sure they save each challenge as a new Python file so that they can easily run them to prove they have finished)

      Extensions & Support

      • Ask students to come up with their own Marty challenges and create their own movement dice
      • Give students the MartyPy documentation and ask them to explore all the different options/movements

      Additional Reading

      • Educator’s Guide
      • Getting Started with Python: Schools