Creating algorithms unit 1 Flashcards

(10 cards)

1
Q

What are the three main programming constructs used in algorithms?

A

Sequence, Selection, and Iteration.

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

What is the sequence construct?

A

It means the instructions are executed in the exact order they are written.

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

What is the selection construct?

A

It allows decision-making in algorithms, using conditions to choose different paths (e.g., IF…ELSE statements).

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

What is the iteration construct?

A

It repeats steps using loops (e.g., FOR, WHILE) until a condition is met.

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

Why are sequence, selection, and iteration important?

A

They are the basic building blocks of all algorithms.

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

What is the first step in creating an algorithm to solve a problem?

A

Understand the problem and break it down into smaller steps.

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

What are the different ways to represent an algorithm?

A

Flowchart, pseudocode, written description, or draft program code.

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

What is a flowchart used for in algorithms?

A

To visually show the steps and logic of an algorithm using symbols and arrows.

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

What is pseudocode useful for?

A

Describing the logic of an algorithm in a clear, readable, code-like way.

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

What is a draft program code?

A

A rough version of the actual code, used to test and build the algorithm in a real programming language.

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