Chapter Seven: Programming Flashcards

1
Q

What are the main advantages of high level language over low level language?

A

In a high level language we can usually multiply two numbers together in one command. Additionally, at machine level, this is not possible and it has to be done by repeated addition.

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

Compare an interpreter and a compiler for use by a student learning to program.

A

A complier converts the whole code into machine code before running it.
An interpreter coverts the code one instruction at a time running each instruction before translating the next.

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

What are the main features of an IDE?`

A

Source code editor: A text editing area organises the code including indenting structures and colour coding command words, variables and comments.
Error diagnostics and debugger: Warnings identify potential problems with the code and listening errors found in the code.
Run-time environment: Allows the developer to run the code during development to check for logical errors.
Translators (compiler or interpreter): Compiles or interprets the source code into runnable machine code.

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

Describe the difference between a variable and a constant.

A

A variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instruction s that tell the computer what to do and data that the program uses when it is running. A constant is an identifier with an associated value which cannot be altered by the program during normal execution – the value is constant.

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

What is meant by ‘Syntax Error’? Give an example of a syntax error.

A

Syntax errors are errors in the use of language rules and these are often identified by the IDE. An example of a syntax error is an assignment being used incorrectly, e.g. 3 + 4 = X is incorrect and it should be X = 3 + 4.

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

What is meant by ‘run-time error’? Give an example of a run-time error.

A

An error that occurs during the execution of a program. In contrast, compile-time errors occur while a program is being compiled. Runtime errors indicate bugs in the program or problems that the designers had anticipated but could do nothing about. An example of a runtime error is programs that do not complete.

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