1.2 Algorithms Flashcards

1
Q

Why is it important for an algorithm’s instructions to be unambiguous?

A

To make sure there is only one way of interpreting the instructions

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

What is an algorithm?

A

A set of instructions for performing a specific task

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

How can you show an algorithm?

A

Flow charts, pseudocode or written instructions

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

Why is breaking down an algorithm into basic parts important?

A

It makes the solution clearer and ensures each step can be easily followed

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

When is a flow chart more suitable than pseudocode?

A

When you need to convey your messages to non-specialists

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

When is pseudocode more suitable than a flow chart?

A

When you are trying to display more complicated algorithms

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

What is syntax in programming?

A

The way a program must be laid out for the computer to understand it

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

Why must instructions in an algorithm be sequenced properly?

A

Instructions execute in the order they are written, so incorrect sequencing can cause errors

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

What is selection in programming?

A

Asking questions to control the flow of the program. I.e. if statements

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

What is iteration in programming?

A

Repeating a task multiple times. I.e. for and while loops

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