CHAPTER 4

DEBUGGING

CHAPTER OUTLINE

4.1 Testing

4.2 Debugging

When a program fails to yield the desirable result, we say that it contains a bug. The bug could be an error such as division by zero, invalid type conversion, using a variable not defined, wrong initialization, or some other unintended operation being performed. The process of discovering the bugs and making the program bug-free is called debugging. In this chapter, we discuss some debugging techniques.

 

debugging: making the program error free

4.1 TESTING

Program testing aims to expose the presence of bugs in the programs. To find the bugs in a program, we test it on various inputs. We correct the errors found in this process and feel confident that the program will run smoothly. ...

Get Python Programming: A modular approach 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.