quiz image

Debugging Errors in Programming

CuteElder avatar
CuteElder
·
·
Download

Start Quiz

Study Flashcards

10 Questions

It is in the operation of programs happen due to misconceptions when solving a problem, improper use and typos of the programming language, or the inability to predict user behavior.

Errors

Programming language communicates just like natural language in that it has its grammar and vocabulary.

TRUE

The “grammar” in the programming language is the ______, set of rules that defines the structure of the instructions.

Syntax

The “vocabulary” are the _________ or list of words that can be used to build instructions.

Keywords

This error violates the language syntax rule, as a declarative sentence should end with a period.

Syntax Error

This new word is not recognizable in the vocabulary of the natural language, thus creating an error. It can also be a word that is out of context, such as using “male” instead of “mall”.

Semantic Error

It is an error as it is not what was originally the intended direction compared to the original message. This error is not easily detectable by the compiler.

Logical Error

It appears when a code is ill-formed. When typos occur, or when unmatching parenthesis or brackets. The code cannot even be executed as JavaScript cannot understand it.

SyntaxError

The semantic error above is called a _______ in JavaScript, as the compiler does not know its meaning.

ReferenceError

This error occurs when the programmer tries to access a function or a variable that does not exist.

ReferenceError

Study Notes

Errors in Programming

  • Errors can occur in programming due to misconceptions, improper use of the programming language, typos, or inability to predict user behavior.

Programming Language Structure

  • A programming language has its own "grammar" which is a set of rules that defines the structure of instructions.
  • A programming language has its own "vocabulary" which is a list of words that can be used to build instructions.

Syntax Errors

  • A syntax error occurs when the code violates the language syntax rules, such as a declarative sentence not ending with a period.
  • Syntax errors can be caused by typos, unmatching parentheses or brackets, and make the code unable to be executed.

Semantic Errors

  • A semantic error occurs when the code is ill-formed and the compiler does not know the meaning, such as using a non-existent function or variable.
  • Semantic errors are not easily detectable by the compiler and can occur when the programmer tries to access a non-existent function or variable.

Test your understanding of common errors that occur in programming due to misconceptions, improper language use, typos, and unpredicted user behavior. Identify and correct mistakes to improve your coding skills.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser