All Flashcards

1
Q

Scope of a variable

A

Defines which parts of an algorithm is visible
Usually the whole program or a subroutine
Cannot be accessed outside of this scope

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

Lifetime of a variable

A

How long the variable is kept in memory
How long until the memory is wiped
How long the data is retained

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

Constant

A

A variable that stores data, which is fixed. For example, Pi will not change.

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

Self documenting identifiers

A

names that should reflect the data stored in them.

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

Local variable

A

They are declared and used within limited parts of program. For instance, subroutine, function or method.

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

Global variable

A

Accessible throughout the whole program

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

Scope

A

How accessible a variable is, whether throughout the program or just without sub-routine.

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

Static variable

A

Variables stored in a location in memory and lasts the entire time the program runs

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

Dynamic value

A

A variable who’s address is determined when the program is run

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

Sequence

A

specific order in which instructions must be carried out for the algorithm to work.

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

Loop

A

Series of steps being carried out more than once.

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

Selection

A

Where a decision is made
Taking one path or the other
Some instructions will have an algorithm containing different options.

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

Rogue value

A

Values that fall outside of the range of normal data

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

Iteration

A

Single pass through a set of instructions
Most programs contain loops of instructions that are executed continuously
Computer repeatedly executes loop, iterating through the loop

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

Algorithm

A

A sequence of instructions that perform a specific task

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