L4 + L5 - Algorithm Design Flashcards
1
Q
What are algorithms?
A
- Order which the instructions are performed
- Sequences
- Decisions
- Repetition
2
Q
What is the flowchart for a decision?
A
3
Q
What is the flowchart for repetition?
A
4
Q
What are the different parts of algorithm design?
A
- Investigation
- Preliminary algorithm
- Refining the algorithm
5
Q
What is the first step in algorithm design?
A
6
Q
What is the second step in algorithm design?
A
7
Q
What is the third step in algorthm design?
A
8
Q
What is pseudocode?
A
- Written statements in english which resembles a programming language to describe the algorithm
- No standard notation
- Uses indentation to show instruction dependency on a selection or repetition
9
Q
What is the pseudocode notation?
A
10
Q
How would you represent functions like maths in pseudocode?
A
- Do not call programming methods
- Instead describe the function of those methods
11
Q
What are the rules of pseudocode?
A
Pseudocode must be
- Correct
- Consistent
- Written in a form that can be understood by teammates
- Clear and unambiguous
- Can be implemented on the intended systems
12
Q
Give the psudocode for a loop
A