Programming Constructs Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Sequence?

A

A series of steps which are completed one after the other. In a flow diagram they are shown as process, input and output symbols shown one after the other.

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

What is Selection?

A

The ability to choose different paths through a program. In flowcharts, decision symbols are used for selection.

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

What is Iteration?

A

Repeating a part of a program. It is also referred to as repeating or looping. In flowcharts, iteration is shown using arrows that repeat a section of the flowchart and a decision will control more iterations are required.

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

Understanding Sequence

A
01 - First of all do this line of code
02 - Now do this one
03 - Now do this one
04 - Now do this one
05 - And this one
06 - And finally this one
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Understanding Selection

A
01 - First of all do this line of code 
02 - Now do this one
03 - IF (Age > 18) THEN
04 - Do this line of code
05 - And now this one
06 -And now this one  
07 - ELSE
08 - Do this line of code
09 - And now this one  
10 - And now this one
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which two sub categories does iteration fall into?

A

1) Count Controlled Loops (run a set number of times)

2) Condition Controlled Loops (run forever - or until a condition is met)

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

Understanding Iteration - Count Controlled Loops

A
01 - First of all do this line of code 
02 - Now do this one
03 - For 1 to 10 time DO
04 - Do this line of code
05 - And now this one
06 -And now this one  
07 - And now this one
08 - END LOOP
09 - Now do this line  
10 - And finally this one
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Understanding Iteration - Condition Controlled Loops

A
01 - First of all do this line of code 
02 - Now do this one
03 - REPEAT all the lines of code below
04 - This one
05 - And this one
06 -And this one  
07 - And this one
08 - UNTIL (Age > 18)
09 - Now do this line  
10 - And finally this one
How well did you know this?
1
Not at all
2
3
4
5
Perfectly