iteration debugging as you start writing bigger programsyou might find yourself spending more time debugging more code means more chances to make an error and more places for bugs to hide one way to cut your debugging time is "debugging by bisection for exampleif there are lines in your program and you check them one at timeit would take steps insteadtry to break the problem in half look at the middle of the programor near itfor an intermediate value you can check add print statement (or something else that has verifiable effectand run the program if the mid-point check is incorrectthe problem must be in the first half of the program if it is correctthe problem is in the second half every time you perform check like thisyou halve the number of lines you have to search after six steps (which is much less than )you would be down to one or two lines of codeat least in theory in practice it is not always clear what the "middle of the programis and not always possible to check it it doesn' make sense to count lines and find the exact midpoint insteadthink about places in the program where there might be errors and places where it is easy to put check then choose spot where you think the chances are about the same that the bug is before or after the check glossary accumulator variable used in loop to add up or accumulate result counter variable used in loop to count the number of times something happened we initialize counter to zero and then increment the counter each time we want to "countsomething decrement an update that decreases the value of variable initialize an assignment that gives an initial value to variable that will be updated increment an update that increases the value of variable (often by oneinfinite loop loop in which the terminating condition is never satisfied or for which there is no terminating condition iteration repeated execution of set of statements using either function that calls itself or loop exercises exercise write program which repeatedly reads numbers until the user enters "doneonce "doneis enteredprint out the totalcountand average of the numbers if the user enters anything other than numberdetect their mistake using try and except and print an error message and skip to the next number