Skip to content
Learning Site
Home

About

  • About Robotical
  • Case Studies
  • Meet the Team
  • Blog
  • Contact Us

Our Products

  • Marty the Robot
  • Axiom
  • Cog

Teach

  • Lessons & Resources
  • Marty for Educators
  • Funding & Grants
  • Professional Development
  • Why Teach STEM?
  • Coding Environments
  • Student Led Learning

Let's Code

  • Marty the Robot
  • Code Online
  • Marty Apple App
  • Marty Android App
  • Update your Marty
  • Cog
  • Code Online
  • Cog iOS App
  • Cog Android App
  • Axiom
  • Axiom Science

Support

  • Marty Get Started
  • Cog Quick Start Guide
  • Axiom Science Quick Start Guide
  • Support & FAQs
  • Marty V2 User Guides
  • Marty V1 Resources
  • Request Support
  • Request Top-Up Training

Shop

  • Marty the Robot and Physical Computing
  • Class Packs
  • Add Ons & Extras
  • Account
  • Shipping, Returns & Cancellations
  • Distributors
HomeLessonsUnits of workCurriculum standardsTutorials

Information

  • Lessons & Resources
  • Knowledge Base & User Guides
  • About Us
  • Shipping, Returns & Cancellation
  • Privacy Policy
  • Learning site privacy
  • Terms of Service
  • Partner Hub

Support & Help

  • Support & Help Center
  • Getting Started with Marty V2
  • Getting Started with Marty V1

Learning, Resources & Guides

  • Marty V2 Lessons Site
  • Marty V1 Lessons Site

Contact Us in the UK

Stanhope House,12 Stanhope Place,Edinburgh,United Kingdom,EH12 5HH
(+44) 0131 564 0922
hello@robotical.io
Contact Us

Contact Us in the US

2810N Church St, PMB 61694,Wilmington,Delaware,USA19802-4447
(+1) 833 886 1661
hello@robotical.io
Contact Us

Why not join our mailing list?

For News, New Products and Special Offers

Join mailing list

Copyright 2016-2026 © Robotical Ltd

All lessons
Marty app
CurrentPrevious

2.4 – Debugging in Python

2.4 – Debugging in Python
Estimated time
45 minutes
Difficulty
Intermediate
Products
Marty V1

On this page

  1. Lesson overview
  2. Objectives & resources
  3. Key vocabulary
  4. Lesson plan
  5. Extensions and challenges
  6. Additional reading

Extensions and challenges

  • Students could try creating their own treasure hunt activities
  • Students could create short Python scripts and place some errors in them for other student groups to try and find then fix

Additional reading

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

Resources

Learner resources

  • Debugging Treasure HuntFile links loading

Lesson overview

Finding problems and errors in Python is a lot different in comparison to Scratch. In this lesson, we cover some easy ways to find the problem with our programs and put them to the test briefly. Students will be using the IDLE editor in this lesson to create and modify Python programs.

Prerequisite knowledge

Lessons 2.1-2.3

Learning objectives

  • Describe the different techniques that we can use to debug programs in Python
  • Given a short Python script, analyse and debug so that it runs as expected

Resources and equipment

  • Marty the Robot
  • Marty Workbooks (Lesson 4)
  • Python treasure hunt scripts and instructions
  • Laptop or PC with Python, MartyPy and IDLE installed

Key vocabulary

  • Python
  • Debugging
  • Logic Error
  • Syntax

Lesson plan

1. Warm up activity, go through a few different short scripts from the PowerPoint slides and get students to decide if they think the program will work as expected

2. Discussion with students around why they think we need debugging and why things don’t always work like we expect when programming

3. Students should go into small groups of around 2-3 where each group has access to a Marty

4. Students in the group should work together to work their way through the Python treasure hunt where they will have to debug some short scripts to get enough clues to work out a fact about Marty!