Learning to debug is one of the most important things you can do as a programmer. Code almost never works first time!
Problems can in two main flavours:
syntax errors- you typed something that Python doesn't recognise
logic errors- the code doesn't produce what it was supposed to
Once you have watched the video, click through all the debug exercises listed below. Beware! They get quite difficult towards the end!
Fullscreen version of the tool below: CLICK HERE
Try some of these problems: Use the dropdown menu to see a new piece of code that doesn't quite work. You do NOT have to complete them all, this is just for practice and there is lots of repetition. You many can you fix?