Preparing to Debug a Program
A “bug” in programmer dialect is a code defect that can cause anomalous behavior. Bugs are normally caused by errors in the code; for example, you type + when you actually meant to type *. This would result in addition instead of multiplication and a totally different result from what you had expected. Other bugs are cause by mistakes in the program logic (the algorithm that underlies your program). An algorithm is a series of steps that are required to execute a task. These steps are (in your case) statements that a computer can execute.
NOTE
In a more general sense the word algorithm can be used to describe any series of steps that accomplishes a task, such as the steps required to withdraw money from an automatic ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access