figure an idle code editing window during debugging for exampleidle - - statistics py sum dat the - argument tells idle to start debugging immediately and the - argument tells it to run the following program with any arguments that follow it howeverfor programs that don' require command-line arguments (or where we are willing to edit the code to put them in manually to make debugging easier)idle is quite powerful and convenient to use (incidentallythe code shown in figure does have bug--middle should be middle debugging python programs is no harder than debugging in any other language--and it is easier than for compiled languages since there is no build step to go through after making changes and if we are careful to use the scientific method it is usually quite straightforward to locate bugsalthough fixing them is another matter ideallythoughwe want to avoid as many bugs as possible in the first place and apart from thinking deeply about our design and writing our code with careone of the best ways to prevent bugs is to use tdda topic we will introduce in the next section unit testing ||writing tests for our programs--if done well--can help reduce the incidence of bugs and can increase our confidence that our programs behave as expected but in generaltesting cannot guarantee correctnesssince for most nontrivial programs the range of possible inputs and the range of possible computations is so vast that only the tiniest fraction of them could ever be realistically tested nonethelessby carefully choosing what we test we can improve the quality of our code variety of different kinds of testing can be donesuch as usability testingfunctional testingand integration testing but here we will concern ourselves