This is an archived version of the course and is no longer updated. Please find the latest version of the course on the main webpage.

Introduction to debugging exercises

This module contains a series of exercises to test your debugging skills. To spice things up, we will ask you to debug programs that use the numpy and matplotlib libraries that you learnt earlier!

Many thanks to the following people for contributing to these exercises: William Hunter

Debugging exercises

In this lab, you are going to debug code, all of which contain functions. Your task is to debug the code until the outputs matche the figures provided.

Inspired by the different heat levels of Nando’s sauces, we will split up these debugging exercises into three sections according to their heat level. We start with Garlic and Herb, move onto Medium and then finally Hot. Naturally the problems get more challenging each time.

When you successfully complete these problems, you will be able to debug Python code and functions. And in the later sections, write them yourself!

The code will be provided to you separately for each part. Alternatively, if you prefer to use Jupyter Notebook, you can also download this single Jupyter Notebook file, where you can access all three exercises as three separate cells.

Are we ready? Let’s go!