Errors Flashcards

1
Q

What are the two main types of errors

A

Syntax
Logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When does a syntax error occur?

A

If written code does not follow the laws of that programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Examples of syntax errors? (3)

A

Misspelling a statement
Using a variable before it has been declared
Missing brackets (opening one and not closing it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a logic error?

A

An error that happens when a computer simply does not do what it is expected to. Something is wrong in the way the program works.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What can cause a logic error? (4)

A

Incorrectly using logical operators
Unintentional infinite loop
Incorrect bracket use
Unintentional repeat of variable names

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a normal error?

A

An invalid value entered into an application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a semantic error? (Logic error)

A

The logic or content of the code is wrong

How well did you know this?
1
Not at all
2
3
4
5
Perfectly