- 48 Views
- Uploaded on
- Presentation posted in: General

Computer Science

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Computer Science

Errors & Debugging

Structures & Loops

- Floating points are not good test values especially if you are using them for comparison
- Don’t forget to enclose Blocks of code in
- Brace brackets { }

- Use the comparison operator == in if statements not the assignment operator =
- Initialize values in if statements to take into account all eventualities
- Use boolean operators correctly to combine conditions

- For a counted loop use for
- For a pre-test conditional loop use while
- For a post-test conditional loop use do
- For a counting and condition loop use for
- Initialize all variables
- Watch for infinite loops
- Use boolean operators correctly to combine conditions