Prgramming (flowcharts And Pseudocode) Flashcards

1
Q

What is meant by a data type?

A

A data type specifies the value a variable can hold. And determines the range of values and operations performed on the variable.

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

What are some examples of data types?

A

Integer: Represents whole numbers (e.g., 5, -10).
Real (Float): Represents decimal numbers (e.g., 3.14, -0.5).
Boolean: Represents true or false values.
Character: Represents a single character (e.g., ‘A’, ‘x’).
String: Represents a sequence of characters (e.g., “Hello, World!”).

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

What are constants and variables?

A

Constants- fixed values that don’t change in the program (π}
Variables- Named memory locations that can hold different values during program execution.

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

What’s iteration?

A

Iteration refers to repeating a set of instructions a certain number of times or until a condition is met.

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

State the types of iteration:

A

a) Definite (Count-Controlled) Iteration: Executes a fixed number of times (e.g., using loops like for or while).

b) Indefinite (Condition-Controlled) Iteration: Repeats until a specific condition becomes false (e.g., using while loops).

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

What’s selection?

A

Selection allows the program to choose between different paths based on a condition (usually using if, else if, and else statements).

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

What are nested structures?

A

involve combining multiple control structures (e.g., loops and conditionals) within each other. For example, an if statement inside a while loop.

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

Why are meaningful identifiers important?

A

Correct naming of variables, constants and program elements enhance code readability.

Instead of using vague names like x, opt for more descriptive identifiers (e.g., total_sales).

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