2.1.7 Programming Flashcards

1
Q

What is an algorithm?

A

A set of instructions to solve a problem

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

What is a logic error?

A

When the program works but not as it’s supposed to

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

What is a syntax error?

A

When there is an error with the code itself

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

What is high level code?

A

They are codes we are able to read and understand. E.g. Java, Python and C

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

What is machine code?

A

Binary code that computers understand, as they cant understand high level code

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

What is opcode?

A

The instruction that the CPU has to execute

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

What is operand?

A

The data that is stored by the CPU

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

What do translators do?

A

They convert source code into machine code

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

What are the three types of translators?

A

Interpreters and compilers and assemblers

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

What does an interpreter do?

A

Takes each line of high level code, converts it and runs it. The CPU executes each instruction before it moves on to the next instruction

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

What does a compiler do?

A

Converts all high level code into machine code and executes it in one go. Once the code has been compiled it can run as often as needed at a higher speed.

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

What does an assembler do?

A

Translates assembly language into machine code. Its written in mnemonics, which is a low level language that closely represents the operations of the CPU

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

What does sequence mean?

A

Code executing line by line, from top to bottom

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

What does selection mean?

A

An if statement

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

What does iteration mean?

A

Loops

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

What are the three types of control flow?

A

Sequence, selection and iteration

17
Q

What is a variable?

A

An adaptable storage location

18
Q

What is a constant?

A

Similar to a variable except its not expected to change

19
Q

What is a local variable?

A

A variable within a subroutine, that is only usable within that subroutine

20
Q

What is a global variable?

A

A variable outside a subroutine, in the normal/main script of the code

21
Q

What is a temporary variable?

A

Generally found in loops, to be used and discarded

22
Q

What are the 4 (5) data types?

A
String - Alphanumeric data
Integer - Whole numbers
Boolean - True or False
Float - Decimal number
Character - A single character
23
Q

What is destructive testing?

A

Testing designed to break the program

24
Q

What is a good data?

A

Data that the code should expect

25
Q

What is bad data?

A

Data that the code wouldn’t expect

26
Q

What is boundary data?

A

Data close the what the program would expect

27
Q

What is null data?

A

Nothing at all