Algorithm Flashcards

1
Q

What is an algorithm?

A

A set of instruction to perform a specific task.

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

It is a well-defined step by step solution.

A

Algorithm.

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

What are the 2 ways of representing an algorithm?

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

It is a variable declaration that is placed in an oval.

A

Terminal box.

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

It represents the beginning/end of a code.

A

Terminal box.

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

More than 2 terminal boxes can exist in a code.

A

False.

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

It is used to connect symbols and indicate the flow of logic.

A

Flowlines.

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

A variable declaration in a hexagon.

A

Initialization box.

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

What is the purpose of an initialization box?

A

To declare a beginning value.

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

A variable declaration in the shape of a parallelogram.

A

Input/output box.

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

The input/output box allows…

A

reading and printing of the data.

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

A variable declaration in the shape of a rectangle.

A

Processing box.

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

The processing box operates….

A

arithmetic and data manipulation.

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

A variable declaration in the shape of a diamond.

A

Decision box.

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

This operates logic and comparisons.

A

Decision box.

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

4 examples of words used in a decision box.

A
  1. Yes
  2. No
  3. True
  4. False
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

A variable declaration similar to a process box.

A

Predefined process box.

18
Q

A predefined process box is a marker…

A

for another process formally defined elsewhere.

19
Q

A variable declaration in the shape of a circle.

A

On-page connector.

20
Q

An off-page connector allows flowcharts to connect on the same page.

A

False. On-page connector.

21
Q

A variable declaration in the shape of an upside-down pentagon.

A

Off-page connector.

22
Q

What is the purpose of an off-page connector?

A

To connect a flowchart to another page.

23
Q

“Pseudo” means…

24
Q

A pseudocode describes an algorithm using a combination of…

A

natural and programming language.

25
A pseudocode can be run.
False.
26
Flowcharts and pseudocodes are read according to...
sequential operation.
27
A sequential operation has no...
conditional or iterative processing.
28
Sequential operation is read from left to right and bottom to top.
False.
29
A conditional operation is a step where...
a decision must be made.
30
This operation asks questions and chooses actions based on the available options.
Conditional operation.
31
What does *modulum* get?
The remainder.
32
How to structure using the modulum (mod) function?
"NUM mod 2 = 0". | The remainder is 0.
33
This operation is more convenient for multiple processes.
Case strcuture operation.
34
This case is usually included in case structure operation.
"Default".
35
Repetition operation uses a _ mechanism which causes a _ of statements based on _ set.
loop, repetition, conditions
36
When a loop body is executed, then...
there will be a change in value of at least one variable.
37
Most loop mechanisms have this effect.
Cumulative effect.
38
What is a counter?
A variable that determines the number of loops.
39
What is an accumulator?
A variable used to store results of an iteration.
40
It acts as a storage for the result.
Accumulator.
41
This operation depicts a sub-routine/process.
Function call operation
42
This is used to determine the variables needed (i.e., input, output, etc.).
Problem analysis.