13

Debugging

It is time for us to dedicate a little more time to debugging our algorithms. In Chapter 5, Errors, we looked at some of the errors we can get when writing code. In Chapter 8, Identifying Challenges with Solutions, we also saw some of the debugging tools that are built into Python to find errors in our code. Now, we are going to go deeper into algorithm debugging, looking at some problem situations and proposed algorithms, determining what causes the errors we are alerted to in the console, as well as those errors that we know exist because the outcome is not what is expected but we do not get an error message from Python. Some of these bugs may not be flagged by Python in any way, which is why we will now focus on some specific ...

Get Applied Computational Thinking with Python - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.