2.3.2 Testing Flashcards

1
Q

What is a syntax error?

A

A grammatical mistake or a mistake in the rules of the programming language.
e.g. writeln(Hello World); instead of writeln(‘Hello World’);

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

What is a logic error?

A

Where the program will execute however it will produce an incorrect or unexpected result.
e.g. GrossPrice = NetPrice – VAT instead of GrossPrice = NetPrice + VAT

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

Give a difference between logic and syntax errors

A

With a syntax error the program will not execute, however with a logic error the program will run.

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