Algorithms Notes Flashcards

1
Q

Computer programs:

To communicate with a computer program, we have to tell it what to do, step by step. This is done using…?

A

a computer program. In order to write a computer program, we must first analyse the task and there are a number of techniques to help with this.

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

Algorithm…?

A

A set of step by step instructions for solving a problem. It is written using ordinary English.

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

Structure diagram…?

A

Are a pictorial way of representing the logic of an algorithm.

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

Pseudocode…..?

A

A method of expressing the logic of an algorithm using statements.

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

Algorithms normally start with an _____ and end with an _____.

A

Input, output.

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

Algorithms can be thought of as…?

A
  • A series of mechanical, repetitive, routine processes.
  • A complete set of unambiguous instructions needed to perform a task or solve a problem.
  • A clear description of how a computer is to proceed in an organised way through a sequence of elementary steps (a computer program).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Characteristics of an Algorithm…?

A
  • unambiguous
  • precise
  • finite
  • effective
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What Algorithms are used in computer systems…?

A

In any computer system, many algorithms are used. For example, some of the algorithms used by an ATM (Automatic Teller Machine) are:

  • Checking that the correct pin number has been entered.
  • Performing a withdrawal of cash
  • Performing an account balance inquiry.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Structure diagrams are used to…?

A

represent the logic of an algorithm. The first step is to break the algorithm into a beginning, a middle and an end.

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

A structure diagram must be read in the correct order…?

A

first the name of the algorithm at the top and then the beginning, middle and end are read across from left to right.

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

Structure diagram symbols:

A rectangle represents…?

A

Process, summary or name.

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

Structure diagram symbols:

A polygon represents….?

A

Input or output.

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

Structure diagram symbols:

Loop or iteration…?

A

Rounded Rectangle.

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

Structure diagram symbols:

If statement or condition…?

A

Hexagon.

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

Algorithms have 3 parts
Beginning…?
Middle …?
End…?

A
  • initialize variables and totals, get inputs.
  • main part, usually has loops and/or conditions (IF), processes, outputs.
  • may have outputs, summary statements.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly