Programming Constructs Flashcards

1
Q

What are the three programming constructs?

A
  • Sequence
  • Selection
  • Iteration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the sequence construct?

A

Sequence constructs tells the processor which statement is to be executed next, this is usually two or more statements following one after another.

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

What is an assignment statement?

A

A value is assigned to a variable

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

What is the selection statement?

A

Selection statement are used to select which statement will be executed next, depending on some condition, conditions are formulated using relational operators.

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

What is a repetition construct?

A
  • Repetition construct causes a group of one or more program statements to be invoked repeatedly until some end condition met
  • Iterative statements always involve performing a loop in the program to repeat a number of statements.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the two types of iteration?

A
  • Indefinite Iteration

* Definite Iteration

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

What is indefinite iteration?

A

Where the iteration continues until some specified condition is met, includes WHILE ENDWHILE REPEAT UNTIL

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

What is a definite iteration?

A

Number of times the loop is to be executed is decided in advance.

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