Commit f6f6ae3e authored by Toby Hodges's avatar Toby Hodges
Browse files

added debugging exercise to worksheet 1.

parent e51b3eda
......@@ -698,5 +698,21 @@
* Like in all programming languages, variables can be used to store the results of calculations or simple values that we might need to use later.
* Variables refer to values. The values can be numbers (integer and floating point), strings or lists. You will discover soon that there are other data types as well.
* Some data types are objects, which have methods associated with them. These methods perform common tasks on the values of the objects.
* Some data types are sequences, which let us access individual elements at will.
* Sequence data types allow us to step through the values in them, but to do that we need to take some first steps towards writing real programs.
%% Cell type:markdown id: tags:
#### _Debugging Exercise_
%% Cell type:markdown id: tags:
The lines below have mistakes in them, which produce errors when they are run. Try to identify the problems in the code, and fix them so that they run without error.
%% Cell type:code id: tags:
``` python
cake flavours = ['chocolate', 'coffee', 'carrot', 'vanilla']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment