computer science
Download
Skip this Video
Download Presentation
Computer Science

Loading in 2 Seconds...

play fullscreen
1 / 3

Computer Science - PowerPoint PPT Presentation


  • 51 Views
  • Uploaded on

Computer Science. Errors & Debugging Structures & Loops. Avoiding Errors with if statements. 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 { }

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Computer Science' - milica


An Image/Link below is provided (as is) to download presentation

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 - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
computer science

Computer Science

Errors & Debugging

Structures & Loops

avoiding errors with if statements
Avoiding Errors with if statements
  • 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
avoiding errors with loops
Avoiding errors with loops
  • 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
ad