Paper 2 Flashcards

1
Q

Algorithm

A

Algorithmic thinking is solving problems by defining the steps and the sequence needed.

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

Abstraction

A

Abstraction is removing unnecessary detail from a problem.

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

Decomposition

A

Decomposition is breaking a problem into sub- problems that each represent a specific task.

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

High level advantage

A
  • HIGH-LEVEL
  • Like written English
  • More readable
  • Portable-can run on many CPUs
  • Slower to execute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Translator

A

It translates a high-level language program into a machine language program that the (CPU) can understand. It also detects errors in the program

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

Compliers

A

High-level Machine code

-The whole program is validated so there are no system errors.
-The executable file is enhanced by the compiler, so it runs faster.
-User do not have to run the program on the same machine it was created.

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

interpreter
adavantages

A

advantages
-You discover errors before you complete the program, so you learn from your mistakes.
-Program can be run before it is completed so you get partial results immediately.
-You can work on small parts of the program and link them later into a whole program.

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

Interpreter disadvantages

A

disadvantages
Interpreted code runs slower than compiled code. the interpreter has to analyse and convert each line of source code into machine code before it can be executed.

-There’s a possibility of syntax errors on unverified scripts.
-Program is not enhanced and may encounter data errors.
-It may be slow because of the interpretation in every execution.

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

truth table purpose

A
  • To show all possible inputs (to the logic circuit)…
    *and the associated/dependent output (for each
    input)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Give two ways that the maintainability of this program could be improved

A

-Use loop / iteration
-Add comments
-sequence

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

advantages of merge sort

A

Merge individual elements into sorted lists of size 2
 Merge lists of size 2 into sorted lists of size 4
 Merge lists of size 4 into final sorted list.

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

difference between function and producure

A

Function returns a value
 Procedure does not return a value

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

advantages of sub programs

A

Easier to maintain
…as code is easier to understand/read
 …as code is shorter
Avoid repetition of code (in the same program)
 …makes program shorter / smaller
 … subprogram called instead of copying/pasting.
 … quicker to develop (new) programs

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

2 defensive design

A

 Input sanitisation
 …cleaning up input data / removing unwanted data

 Validation
 …checking whether input data should be allowed / is
sensible / follows criteria

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

difference between iterative and final testing

A

Iterative is during development // repeatedly testing
after/while making changes
* Final is when the development is (almost) complete //
done after iterative testing

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

tools that the IDE provides

A

Editor
* to enable program code to be entered/edited

Translator / compiler / interpreter
* to convert the high level code into machine code /
* low level code / binary

Error diagnostics / debugging
* to display information about errors (syntax / runtime) / location of errors
* suggest solution.

17
Q

insertion sort difference

A

Insertion sort: * inserts/moves values into correct position * inserts value once (then in correct position)

18
Q

bubble sort difference

A

compares/swaps pairs of values
* value is repeatedly moved/swapped (until in correct position)
* repeats if a swap has been made // needs multiple passes

19
Q
A