Understanding Algorithms unit 1 Flashcards

(11 cards)

1
Q

What is an algorithm?

A

A step by step process of solving a problem.

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

What are algorithms used for?

A

To plan and describe how a task or problem should be solved step-by-step.

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

In what forms can algorithms be represented?

A

Written descriptions, flowcharts, and pseudocode.

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

What is pseudocode?

A

A structured, code-like way of writing an algorithm that is easy to understand and can be translated into actual program code.

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

What is a flowchart in the context of algorithms?

A

A diagram that shows the sequence of steps in an algorithm using symbols like arrows, ovals, and rectangles.

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

What are arithmetic operators used for?

A

To perform mathematical calculations in an algorithm or program.

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

List 5 common arithmetic operators.

A

+ (add), - (subtract), * (multiply), / (divide), % (modulus/remainder)

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

What is a variable?

A

A container used to store data that can change during program execution.

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

What is a constant?

A

A container for data whose value does not change during program execution.

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

Why should you use descriptive names for variables and constants?

A

It makes the code easier to read and understand.

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

How can an algorithm be turned into a program?

A

By writing the steps of the algorithm as code in a high-level programming language (like Python, Java, etc.).

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