Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

State what is meant by the term ‘algorithm’.

A

A step-by-step description of how to solve a problem/carry out a task

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

Give examples of some implementations of algorithms.

A
  • Flowcharts
  • Pseudocode
  • Written descriptions
  • Program code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three main programming constructs used within an algorithm?

A
  • Sequence
  • Selection
  • Iteration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does this symbol represent in a flowchart?

A

Selection - shows true/false decisions where there are two possible outcomes

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

What does this symbol represent in a flowchart?

A

Input / Output - shows when data is input or output by the algorithm

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

What does this symbol represent in a flowchart?

A

Subprogram - shows function or procedure that has its own flowchart

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

What does this symbol represent in a flowchart?

A

Terminal - shows start and end of an algorithm

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

What does this symbol represent in a flowchart?

A

Process - shows data processing (e.g. a calculation)

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

What is a subprogram?

A

A self-contained block of code that performs a specific task within a larger program

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

Give some reasons as to why the use of a subprogram is beneficial.

A
  • Breaks down complex program into smaller parts
  • Makes program logic clearer
  • Makes it easier to maintain code
  • Enables code to be used as many times as needed in program
  • Enables code used for common tasks to be stored in libraries and used in different programs
  • Helps efficiency of a team of programmers working on project at same time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly