EXERCISE: Error Debugging Intro

Most IDEs come equipped with a debugger – they will highlight lines where the syntax doesn’t make sense for that specific language. They also tell you which type of error it is at the bottom of the IDE.

Other times your code will RUN but what you expected doesn’t happen. Usually, it’s a syntax error – i.e. bugs. You must learn and take note of these errors so that you can fix them – i.e. Debugging. In computer programming and software development, debugging is the process of finding and resolving bugs within computer programs, software, or systems.

The print out lines have an error.

YOUR EXERCISE: 

  1. RUN the code.
  2. Notice the line gets highlighted in red and at the bottom the IDE let’s you know that there has been a syntax error 
  3. Go to the line and fix the error and then RUN the code again.

Can you see the error? Notice the ” ‘ quotations on Line 3? What is missing on Line 5?

In programming you have to look at EVERY LITTLE piece of the syntax, every comma (,), semi-colon (;), bracket ( { [ and more has a specific meaning. If you leave it out, or use the wrong one – RED errors. So look a the detail.