4.4.1- ToC (Following and writing algorithms) Flashcards

1
Q

What is meant by the term algorithm

A

A sequernce of steps that can be followed to complete a task and that always terminates

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

What are the advantages of psuedocode

A
  • Independent of any partticular language
  • Allows those who are programmers to be involed in the development of a program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the distinction between algorithms and computer programs

A
  • Computer programs are simply just implementations of algorithms.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are the following represented in psuedocode:
1. assignment
2. selection
3. iteration

A
  1. variable <– value
  2. IF (condition) THEN
  3. FOR number <– lb to ub (inclusive)

or

WHILE ( condition )

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

When designing to make a solution for an algorithm, what must you consider

A

If the order of steps required to solve the problem is important or not

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

How do you determine the purpose of an algorithm

A
  • Analyse the inputs given and what those inputs are used to do
  • Analyse the ranges in selections and iterations and compare the change between the input and output using test data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the three types of test data

A
  1. Normal
  2. Boundary
  3. Erroneous
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is normal test data

A

any valid data input

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

What is boundary test data

A

Edge Case data or data that sits ton the edge of the normal range of data

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

What is Erroneous test data

A

any invalid data input, that should generate an error

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